Questions tagged [alias]

In computing, an alias is an alternate name for an object, such as a variable, file or device.

Filter by
Sorted by
Tagged with
1
vote
1answer
68 views

Doskey alias command from a cmd shortcut not working

Opening a cmd prompt and manually issuing my custom doskey macro commands works fine, but I figured that I could save time by creating cmd shortcuts that invoke these commands automatically. So, I ...
0
votes
1answer
86 views

PowerShell Script: Can you create a dynamically updating variable ($var.substring([int32],[int32]))?

UPDATED/REWRITTEN QUESTION The following is a re-write of a question some found to be confusing. However, I am re-writing this question after learning what I hoped to accomplish was not possible. But,...
0
votes
2answers
49 views

Configuring DNS to resolve to WAMP Virtual Host?

I have a website set up on a VM using WAMP. That VM is on a network with an internal domain 123.net. In DNS, I've configured a CNAME (site.123.net) to point to the VM. However, when I try site.123.net,...
0
votes
2answers
45 views

Creating folder alias in Windows 10

I've got the following issue with both a Windows 7 and a Windows 10 installations in french. Let's say I have a file located in my user's home drive: c:\users\USER123\video.mov. For an unknown ...
1
vote
1answer
89 views

List three latest files in a directory in linux in the commandline?

I was thinking of adding a convenience alias for myself. As of right now I have an alias called ll for ls -lha. However, I noticed there were several occasions where I wanted to list the latest three ...
0
votes
2answers
16 views

Generic way to get mail provider email account aliases for mail client to use as Send From

I have an IMAP account for a domain and I have setup aliases in, the IMAP account provider, to help me separate out my email for different things e.g. sales@ support@ etc. Is there a generic way for ...
8
votes
4answers
2k views

Circumventing “Remote Host Identification Has Changed” warning

I'm connecting to a lot of devices that uses the same IP addresses. When I'm plugging them into the router I'm getting the warning message REMOTE HOST IDENTIFICATION HAS CHANGED! and need to run ssh-...
0
votes
1answer
25 views

Bug/Feature/Faulty while script in zsh

I found a cool script on tecmint: while true; do echo "$(date '+%D %T' | toilet -f term -F border --gay)"; sleep 1; done and tried to alias it in my .zshrc as what-time like so: alias what-time = "...
0
votes
0answers
18 views

How to attach a password to sudo process in Alias?

I have the following user that I access to using a predefined alias: alias userP "su pullexec" Literally, every time I give a password of the user pullexec in order to login. I would like to attach ...
0
votes
2answers
125 views

Creating a symlink or alias that point to current user´s home sub-folder

Is it possible to create, using terminal on a mac, for a mac, a symlink or an alias to ANY currently logged in user of a mac? This symlink/alias is to be included as a "drop destination" for a ...
6
votes
1answer
101 views

Set PowerShell Aliases with a script

I created a PowerShell script to set aliases for a PowerShell session. When I run the script and try the alias, I get the error saying that the alias isn't recongized. How can I use the aliases that ...
2
votes
1answer
535 views

Office 365 - Remove alias from shared mailbox

I have an issue on O365. My customer would like to use the shared mailbox I created as a distribution group. So I thought "ok, lets create an alias test2@test.com on the shared mailbox, put it as ...
0
votes
0answers
32 views

Understanding zsh blobing, alias, and tab completion

I am new to zsh and recently moved on from csh, due to obvious reasons. Oddly enough, its taking me slightly longer than I expected to port a lot of aliases which I use extensively. Here's one of ...
0
votes
0answers
20 views

Can we create alias for Spark built in functions?

I am working on an assignment to port Impala functions to Spark SQL. I understand that they cannot be permanently created but need to be registered within each session. It seems that many functions in ...
1
vote
0answers
40 views

Can nginx be configured to run multiple microservices using different languages under a single domain

I can get nginx aliases and roots to work for static sites - unfortunately I can't seem to get dynamic content to work. Basically what I have is a suite of micro services. Some using the PHP Lumen ...
0
votes
2answers
30 views

Add serveral nginx locations

I read a lot of stackoverflow answers about this topic, but it's imposible resolve my problem. I have 3 locations and I want 3 urls: http://www.example.com/ ---> /var/www/public_root http://...
0
votes
0answers
74 views

Aliases in .ssh/config

is it possible (or what would be a clean alternative) for defining a new ssh alias based on existing host definition. Example configuration: Home server behind NAT and a backup server on another ...
1
vote
0answers
20 views

execute a banged git-alias (!“tricky-functions here”) with a different shell

I have recently started using a system where /bin/sh --help reports an old version of bash. $ /bin/sh --help GNU bash, version 3.2.57(1)-release-(x86_64-apple-darwin18) This affects some of my my ...
1
vote
0answers
32 views

Source-code-compiled qt on command

Backstory I am using opensuse, there are built-in qt4 and qt5 in my system. I need more complete tools from qt for compiling a file, that’s why I installed from source code via qt website. I have ...
0
votes
1answer
111 views

Asterisk how to call by names instead of numbers

I haven't found anywhere clear sample how can I setup alphanumeric alias for internal numbers. For example I am calling now to 504@ip. How can I make it possible to reach 504 number by john@ip by ...
0
votes
1answer
241 views

Sieve rule for catch-all email setup: Filter into folders based on alias

I'm running a catch-all email setup with my own domain (mydomain.tld). My hoster offers me to create arbitrary Sieve mail filter rules. I would like to create a rule that moves all incoming mail to a ...
1
vote
2answers
295 views

Can I alias the empty string?

In bash, can you alias a null command to something?  In other words, recognize that the user has pressed just the Enter key at the shell prompt?  For example, if you want to clear the screen with a ...
0
votes
0answers
126 views

How do I set the aliases to echo the commands before executing on Windows

I am setting command line aliases on Windows using doskey /MACROFILE=foo.txt. Before executing each command, I would like my command prompt to echo the actual command that I would be executing ...
0
votes
1answer
153 views

How can I get Google Chrome to go to an internal page without performing an external search?

I am trying to replicate some behavior that I have seen in Internet Explorer version 11 in Google Chrome version 71. Whenever I search myalias/someinternalpage I am brought to the internal page. ...
1
vote
2answers
69 views

How to make “cd …” goup two directories?

So, currently on macOS I have aliases set up like this... alias ...='cd ../..' alias ....='cd ../../..' This allows me to go up multiple directories by typing in ... in my terminal. However, in my ...
1
vote
0answers
94 views

How to rebase a branch from previous fork in one command?

So I'm trying to come up with a ZSH alias for Git that will rebase my current branch onto the branch it was originally derived (forked) from. Examples: Given the following branch names of A and B. ...
0
votes
1answer
107 views

Assign aliases using FOR in Windows cmd.exe

I've been trying to use a loop to create multiple aliases without success. I'm not a professional, please bear with me... Does anyone know what's wrong in my code or how I can implement this in the ...
0
votes
1answer
60 views

Set up a shortcut to a folder with spaces and hyphens

Hi: I am a Mac OS X user and my work offers us Microsoft OneDrive. The problem is the path name for folders stored on the OneDrive has spaces and hyphens. Like this: ~/OneDrive - My University ...
5
votes
4answers
994 views

Space in doskey/alias for windows?

I try to run Laravel's Artisan command inside the (docker) container by defining a doskey alias. My idea was: php artisan=docker-compose exec apache php artisan $1 However it does not allow me to ...
3
votes
1answer
216 views

Alias for sudo then ssh

I am looking to write an alias for the following two command: sudo su - user ssh somewhere I've tried alias jump='sudo su - user; ssh ' and then use this as jump somewhere but this doesn't work....
3
votes
1answer
239 views

Dynamically creating aliases in PowerShell

I'd like to create some aliases dynamically but I can't get my code to work. Here's the code: # Drives $drives = ("a","b","c","d","e") foreach ($drive in $drives) { New-Item -Path alias:\ -Name $...
7
votes
1answer
1k views

bash / zsh alias: Can I grab the arguments and use within subshell?

I would like an alias that gives a directory listing in dictionary order with "." files first. It seems that one few ways to accomplish this devoid of writing my own script (which isn't a real problem)...
1
vote
1answer
718 views

Why does `source ~/.aliases` not work in .zshrc?

user@localhost ~ % zsh --version zsh 5.5.1 (x86_64-redhat-linux-gnu) me@localhost ~ % lsb_release -a LSB Version: :core-4.1-amd64:core-4.1-noarch Distributor ID: Fedora Description: Fedora ...
1
vote
2answers
747 views

Powershell console profile aliases (functions) not working, why?

This TechNet page says the location of a console profile file for the current user only and all shells shall be: %UserProfile%\Documents\Windows­PowerShell\profile.ps1 In my case, the %UserProfile% ...
0
votes
1answer
43 views

Where is the Alias Editor/Manager in Windows 7?

I'm reading some documentation that mentions it. It says the Alias Manager is found under Configuration in the Menu Bar, but the Menu Bar is not an option for me unfortunately. The search has also ...
0
votes
2answers
770 views

Adding more IPs to same network interface - Alias or not?

I'm using raspbian (kernel 4.1.19+): I want to setup the same network card on the latter to have two IPs (namely 192.168.1.9 and 10.0.0.1 on wlan0). My /etc/network/interfaces has sections: auto lo ...
0
votes
0answers
33 views

alias for a external drive in Linux <name+colon>

Is there a way to mount a external drive (/mnt/drive_c) and use an alias/name as "drive_c:" or "c:" (an alias) so you can issue commands like: ls -la drive_c: ls -la drive_c:/windows/system32
1
vote
1answer
156 views

How do I make . execute the last shell command in zsh?

In bash, alias .= "fc -s" works for this purpose, it does exactly what I want. But in zsh, using fc -s just outputs fc: bad option: -s. How do I make . execute the last shell command in zsh?
2
votes
1answer
493 views

When using SSH, the .bashrc alias on that server is not being read, even tough it is set correclty in .bash_profile and .bashrc

I use SSH to login to a remote machine. I can save the alias like so, in .bashrc: alias l='ls -lla' but when I logout and SSH in again, the alias does not exist. It is set properly, however, in ....
4
votes
1answer
2k views

Create aliases dynamically

I want to create aliases based on a command, its subcommands and its options. I'd like the alias to be the acronym of those components. This is simpler to explain with the real example: alias mc="...
1
vote
1answer
51 views

How does bash alias understand “$@”?

I am trying to write an alias to do 2 things $alias cde='cd "$@" && echo' but for some reason when I call it with $cde test test all that happens is it echos test: It looks like my ...
9
votes
2answers
3k views

Alias does not “override” PATH entries?

The last line of my .bash_profile is: alias cp=/usr/local/bin/gcp However that is being squashed by the entry in my $PATH : $which cp /bin/cp 11:54:32/OCspark $type cp cp is aliased to `/usr/local/...
1
vote
1answer
95 views

Alias not assigned correctly

I have a weird issue with a bash alias. I have the following alias defined in my .bashrc: alias rec='nano `ls slurm-* | sort -t. -k3n | tail -1`' However, when I expand the alias rec in the shell ...
2
votes
2answers
2k views

Why this PowerShell alias does not work?

I am learning PowerShell. I would like to understand why some aliases in PowerShell 5.0 under Windows 8.1 do not work. For instance, this command alone works: Get-WmiObject -Class Win32_WinSAT But ...
39
votes
1answer
8k views

How can I pass an alias to sudo?

I have tried putting my aliases in ~/.bash_profile, ~/.bashrc, /etc/profile, and /etc/bashrc. I am still unable to execute the following: alias zf2="php public/index.php" and then execute: sudo ...
-2
votes
1answer
38 views

Aliases in Bash shell

In the documentation regarding Aliases in Bash there is a statement: The first word of each simple command, if unquoted, is checked to see if it has an alias What is "simple command" and "first ...
0
votes
1answer
102 views

How to create custom alias for gnuwin32 tools in Windows Powershell

I have gnuwin32 installed and appended to my environment so I run linux/unix "ls" when I type ls in the command prompt. That's not a problem for Powershell, apparently, but I'm not being able to ...
1
vote
1answer
9k views

How can I add password of user as alias in bashrc file?

I have created alias for username and it works fine alias yb="ssh name@hostname" It works fine, but I also want to create alias for password, Can anyone help how can I do this?
0
votes
1answer
57 views

Netbeans detect javascript alias tag?

Netbeans will apply the appropriate formatting and parsing when it loads a .js file of detects <script> tags in the current .html or .php file I am working in. I am using Zend Framework 2 to ...
19
votes
1answer
7k views

Bash is slow to start because of this line in .bashrc. What could cause this?

My .bashrc file contains a line to this effect: alias prog="/path/to/script.sh $(find $(pwd) -name prog)" When I comment out this line, Bash starts almost instantly when I open a new terminal. With ...

1
2 3 4 5
7