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
2 votes
1 answer
355 views

What's the rule on using the word "git" as an alias?

I used to keep my git aliases in a file outside of my .gitconfig file, in the normal format of: alias gb="git branch --verbose" which worked great. But, after looking around at others' dotfiles, I ...
Kevin Suttle's user avatar
2 votes
1 answer
1k views

How to make alias shortcuts for terminal work as root or as exec?

Let's say I have an alias like this: alias findip='wget -q -O - checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//'' the output would look like this: matthew@ubuntu:~$ findip 71....
John Dorian's user avatar
2 votes
1 answer
3k views

csh cd alias: how to eliminate error when no parameter is supplied

I am familiar with bash, but my works require csh. in my .cshrc, I created this alias: alias cd 'cd \!:1; ls -l' It works very well except for one case: when I cd without any parameter: cd In ...
Hai Vu's user avatar
  • 6,060
2 votes
1 answer
4k views

How to set alias permanently using command?

I don't have access to home directory. So I can't access .bashrc or .profile file. So the only option (I guess) is using the command for setting alias. Is there any way to add alias permanently using ...
user avatar
2 votes
1 answer
314 views

Alias for an URL and not for a file in MacOS

In macOS, an alias is a small file that I can click in Finder, which represents another object in a file system and provides a dynamic link to it. Is there a way to have a small file like an alias ...
Sachama's user avatar
  • 23
2 votes
1 answer
594 views

How to run aliases under tmux without root privilege

Under terminal multiplexer tmux I am unable to use alias as a normal user. alias l='ls -CF' alias la='ls -A' alias ll='ls -alF' alias ls='ls --color=auto' For alias of alias l I have to type ls -CF ...
vusan's user avatar
  • 173
2 votes
1 answer
2k views

piping output to an alias

in order to run a certain command I need to use sudo -h -u someuser <somecommand> in order to save some sanity I created an alias alias somecommand='function _dm(){ sudo -u ubuntu ...
Jeffrey Ellin's user avatar
2 votes
1 answer
3k views

Creating an 'alias' or 'symlink' to a separate folder in apache

-/ |--bin |--home |--user_1 |--somefile.html |--somefile2.html |--user_2 |--differentFile.html |--var |--www |--file1.html i want the urls to be http://serverip/user_1/somefile....
Joseph's user avatar
  • 51
2 votes
2 answers
407 views

alias or function for emacs command?

So I'm on my first day at my new job, and on the server we use, the default emacs is X-windows based. I much prefer using it in the good old terminal, and I'd like to be able to make the command ...
Frank Harris's user avatar
2 votes
1 answer
301 views

Can I use the first page of a PDF document as its alias icon in OS X?

Is there a painless method for using the first page of a PDF as its alias icon in OS X? The operating system does this for PDF documents on the desktop, and I'd like to replicate the behavior for ...
rbright's user avatar
  • 23
2 votes
0 answers
33 views

Read Only folder alias in Windows

I have a folder I would like to create a read only alias of to prevent tools from modifying the original contents in any way. The original should be kept in "pristine" condition so ...
dana44's user avatar
  • 21
2 votes
0 answers
143 views

Add appExecutionAlias manually?

By default, Windows 10 stores app-aliases in %USERPROFILE%\AppData\Local\Microsoft\WindowsApps\ however this is only partially true (or not true at all, if you think about it). Listing the files in ...
KreonZZ's user avatar
  • 171
2 votes
1 answer
729 views

Alias ssh to have a default -F flag

I would like to "alias" ssh in my PowerShell profile to: ssh -F $HOME\.ssh\config I have a custom $HOME environment, but the Win32 OpenSSH implementation uses %USERPROFILE% which cannot be ...
Holt's user avatar
  • 181
2 votes
1 answer
2k 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 [email protected] on the shared mailbox, put it as ...
RazZ's user avatar
  • 21
2 votes
0 answers
988 views

How to read aliases in a ksh script

I have some global aliases defined in my ~/.profile file. To read them from a bash script, I'd use: shopt -s expand_aliases source ~/.profile However, in ksh this does not work because it does not ...
shrx's user avatar
  • 454
1 vote
2 answers
1k 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 ...
Ilias Karim's user avatar
1 vote
2 answers
40k views

SQL Statements in MySQL, the use of the dot operator

The following is the SQL statement that I found: SELECT d.name, count(e.emp_id) num_employees FROM department d INNER JOIN employee e ON d.dept_id = e.dept_id GROUP BY d.name HAVING count(e.emp_id)...
edgards's user avatar
  • 11
1 vote
2 answers
1k views

Use the result of 'whoami' as part of an alias

I am setting up my default .bashrc on my Ubuntu machine that I will soon be adding more and more users to. One command that users will have access to is mysql, logging them into the SQL system on the ...
Matt Clark's user avatar
  • 2,074
1 vote
2 answers
930 views

What is a simple standard command line way of getting 'ls' to produce file permission in octal?

Any know a standard way, other than 'stat' to produce octal output for file permission from 'ls'? Standard way of using stat (on OSX) is: stat -f '%A %a %N' * where * can be any file pattern that ...
ashr's user avatar
  • 111
1 vote
1 answer
353 views

Unix: Overloading Aliases

What happens if I have this in my bashrc: alias ls="ls -l" alias ls="ls -a" when I type ls they will both match. Is the last one kept or both?
sixtyfootersdude's user avatar
1 vote
2 answers
2k views

Why does an alias work in the Terminal, but not when called from a script?

I've added the following to my ~/.bash_profile # opens "flashlog.txt" in Console alias trace='open -a /Applications/Utilities/Console.app/ ~/Library/Preferences/Macromedia/Flash\ Player/Logs/flashlog....
Michael Prescott's user avatar
1 vote
1 answer
1k 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 ...
le_me's user avatar
  • 531
1 vote
1 answer
84 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 ...
Sepehr Nazari's user avatar
1 vote
2 answers
3k views

Error in url alias in lighttpd

I have this configuration: alias.url = ( "/acruz/" => "/var/www/localhost/htdocs/acruz/", "/jvangemeren/" => "/var/www/localhost/htdocs/jvangemeren", "/doceno/" => "/...
AbrahamSustaita's user avatar
1 vote
1 answer
220 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 ...
prubini87's user avatar
  • 155
1 vote
2 answers
891 views

Alias for directory using a symbol

I'm looking to set up an alias for my work directory, which can change as I change context, and I was trying to find something that was short enough to stand in as a replacement for ~. I'd be tickled ...
OmnipotentEntity's user avatar
1 vote
1 answer
2k views

How to add an application to Mac Applications folder

I'm looking to add software installed elsewhere (eg. home or opt) to the Mac's (10.8) Applications folder. The goal here is to get all the benefits like the application listing in the launcher and ...
Adam's user avatar
  • 155
1 vote
1 answer
2k views

Create alias (desktop shortcut) of an application installed by Macports

I just installed Dia using macports. Now, I need to place the shortcut in the Apps folder and also make the executable available in the Spotlight search. How can I do that?
zengr's user avatar
  • 1,364
1 vote
1 answer
972 views

powershell function does not work

I'm new to powershell scripting. scan a file with windowsdefender from command line. what I'm doing wrong? function scan { Start-Process "C:\program files\windows defender\mpcmdrun.exe" -...
testoflow's user avatar
  • 137
1 vote
3 answers
307 views

Documentation for alias definitions for PowerShell arguments used with Get-ChildItem

In an answer here on superuser.com, it is pointed out that gci -af is an alias for gci -File. That information is correct, and both command lines produce the same result of file listings. However, I ...
Sabuncu's user avatar
  • 486
1 vote
2 answers
3k 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,...
user374369's user avatar
1 vote
1 answer
114 views

Creating aliases beginning with + or -

Most of the times, I find that I'm doing: % chmod +x <file> #or +r or +w So, I thought about creating an alias such that: % alias +x='chmod +x' # or % alias \+x='chmod +x' # or % alias '+x'='...
hjpotter92's user avatar
1 vote
3 answers
825 views

Set Windows command prompt aliases as regular user

As a regular user in Linux this can be done via the command alias and can be permanently stored in the .bashrc file As a regular user (not administrator) can I set command prompt aliases in Windows 7?...
John Dream's user avatar
1 vote
1 answer
781 views

pass arguments to alias then disown

I am trying to create a simple alias: alias draw="pinta &> /dev/null & disown" The intent here is pretty obvious. My problem is that whenever I pass an argument, I get bash: disown: ...
ewok's user avatar
  • 4,211
1 vote
2 answers
1k views

Linux: How to automatically detect display and set up default editor accordingly

I am relatively new to linux. I am connecting to a remote linux machine sometimes via telnet and sometimes via NX client for windows. When I connect via telent I would like the default editor to be ...
derekswanson08's user avatar
1 vote
1 answer
101 views

How do I set an alias for a search command that takes two arguments

I have a shell command which find files that contain 2 strings together: $ grep -rl JFL . 2>/de/null | while read n; do grep -l 20120907 "$n"; done The strings above are JFL and 20120907 Now I ...
alwbtc's user avatar
  • 2,955
1 vote
1 answer
79 views

Windows Search alias

I have a program that I used to use all the time. Now however a new one has superseded it. However I constantly forget it's name, and when searching for it using the windows search, I keep using the ...
David Turley's user avatar
1 vote
2 answers
2k views

Creating an alias in Powershell that includes a space (for a parameter)

I want to start the control panel applet RunDll32.exe shell32.dll,Control_RunDLL via an alias in PowerShell. Running it directly works fine but when I set an alias: set-Alias controlpanel "...
Albin's user avatar
  • 10.6k
1 vote
2 answers
2k 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 ...
Raj Narayanan's user avatar
1 vote
1 answer
828 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. ...
Bradley Marques's user avatar
1 vote
2 answers
2k 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% ...
Vlastimil Burián's user avatar
1 vote
1 answer
224 views

How do I write a bash alias that replaces !$ with the previous command’s last word?

I have a script named cpodin that copies several build artifacts to another directory. Afterward, I edit SHA1SUM in the destination directory. For example: cpodin /foo/bar/baz vim !$/SHA1SUM How do ...
Greg Bacon's user avatar
1 vote
1 answer
2k views

Get the ip address from ifconfig

I was updating my shell dot file, and I thought that it would be nice to have an alias that show just my ip. I usually connect with wifi, which is on wlan0 and it's the last "block" of devices. So I'...
Federico Ponzi's user avatar
1 vote
2 answers
2k views

Unable to send to email address with "plus" character using gmail

I'm attempting to forward emails from gmail to a project managed by active.collab. All I need to do to accomplish this is forward my email to an address like [email protected]....
Josh Padnick's user avatar
1 vote
1 answer
168 views

How can I make alias for desktop folder on XP?

I don't want other users save file to system drive, how can I make a direct link of desktop folder to another folder?
Ngoc Anh's user avatar
1 vote
1 answer
199 views

Alias one program in a different order than $PATH

I alias pandoc='~/.cabal/bin/pandoc' because I don't want to change my $PATH order just for this one program. In general, programs I installed in /opt/, ~/.cabal/, and so on should precede defaults ...
isomorphismes's user avatar
1 vote
1 answer
373 views

SSMS view designer - how do I give a table an alias?

I'm struggling with getting SQL Server Management Studio to do what I want. Things that were totally simple and easy tasks in Enterprise Manager have inexplicably become hard or impossible. Case in ...
Martha's user avatar
  • 930
1 vote
1 answer
1k views

ssh port forwarding and multiple aliases

I have the following ~/.ssh/config file: $ cat ~/.ssh/config Host myalias HostName fully.qualified.domain.name Port 2222 LocalForward 3690 127.0.0.1:3690 When I ssh to myalias, ...
Suzanne Soy's user avatar
1 vote
1 answer
3k views

Where is virtualenv's deactivate defined?

Virtualenv defines an alias for the command deactivate as seen in yourvirtualenv/bin/activate.csh. What I'm curious about is where deactivate resides, because when I issue an alias command deactivate ...
Parham's user avatar
  • 113
1 vote
2 answers
753 views

Can I have two different users in Windows XP to use the same local profile (user alias)

I need to have two different userIds that map to the same local profile. What I really need is to have to users that are the same one. Is this possible? Thanks!
Ignacio Soler Garcia's user avatar

1 2 3
4
5
8