I have set some aliases in my .bashrc file and for some reason one of them does not behave as expected.
Since I don't remember the exact command assigned to that alias, I would like to see the command to find out what's wrong.
Except the obvious opening the .bashrc file to see it, is there a command that just echos the command assigned to that alias?
The average linux users use the terminal commands for many tasks and some certain commands are very frequently used. For example, if you are a user of Ubuntu, you have to type " sudo apt-get install" every time you want to install a new package or the command "xset dpms force off" to turn off the desktop/laptop monitor.
alias bashrc='nano ~/.bashrc'
alias reload='source ~/.bashrc'
alias ls='ls --color=auto'
alias grep='grep -n --color=auto'
alias pacman='sudo pacman'
alias update='sudo pacman -Syu'
alias search='sudo pacman -Ss'
alias install='sudo pacman -S'
alias remove='sudo pacman -Rns'
alias makepkg='makepkg -s -
In my /home/user/.bashrc file, I have those aliases to prevent mistakes:
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
If I'm really sure of what I'm doing, I can overwrite rm and mv aliases using rm -f or mv -f, it will not ask me if I really want to overwrite files.
The problem, is that it doesn't work for the cp command, using cp -f will still ask me a question.
Is this normal?
Hello,
Upon a fresh install of Fedora 11 (and as a Fedora n00b), I noticed there are several aliases defined for me.
Code:
$ alias
alias l.='ls -d .* --color=auto'
alias ll='ls -l --color=auto'
alias ls='ls --color=auto'
alias vi='vim'
I am trying to create an alias and I have added these lines in ~/.bash_aliases
alias server-python='open http://localhost:8000 && python -m SimpleHTTPServer'
alias ssh-saad='ssh saad@<my-server>' <my-server> is replaced by the ip add of my server. So in my ~/.bashrc file these lines are uncommented
if [ -f ~/.bash_aliases ]; then
.
I am attempting to put some alias definitions in .bashrc. Like this:
#Convienience aliases
alias ll='ls -l'
alias ldir='ls -p | grep "/"'
#Temporary aliases
alias mvFooLog='mv ~/Projects/Foo/Log.txt .'
The last alias will work for me, but there seems to be some subtlety which is corrupting the definition of the first two.
So I am editing bashrc constantly, and I have a terminal open with a working function definition, although bashrc has been updated with a wrong function definition. (Because the definition do not change until I source the updated bashrc) How can I look up the working function definition in this case? For example, if I type:
alias function_name
I can see what the definition is for that alias.
I am trying to define some commands for my convenience but worried a bit if editing .bashrc can lead to security issues.