I have a copy of a data copied from a mac machine, the volume includes a lot of alias files, i need to convert those files on a Linux system into softlinks; I want to do this on a linux machine as well. If i can read the file name the alias points to, i can write a script to delete the file and delete the alias and create a softlink. but i need a tool to read that piece of information.
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?
hi there, i've got this alias i want assign only sometimes, and then work in the same shell with it (so when closing the shell the alias dissapears). As the alias is long, i want it to be in a executable file, so i just execute the script from a terminal and then i can access the alias from that same terminal.
Most of my my aliases are of this form: alias p='pwd'
I want to alias git commit so that it does git commit -v
But trying to create an alias with a space gives an error:
$ alias 'git commit'='git commit -v'
-bash: alias: `git commit': invalid alias name
I'm trying to setup an alias in my .bashrc file, but it's not working as expected.
I have this alias which works:
alias lolcat='python /home/martyn/Dropbox/Applications/Scripts/logcat-viewer/unixcoloredlogcat.py'
and I normally use this command as such:
adb logcat SomeValue:* *:e | lolcat
But I want to put that in to an alias so that I can write:
logcat SomeValue
but my alias below isn't
Suppose you have an alias go, but want it to do different things in different directories?
In one directory it should run cmd1, but in another directory it should run cmd2
By the way, I have an aliases for switching to the above directories already, so is it possible to append the go alias assignment to the foo alias?
alias "foo=cd /path/to/foo"
Working in bash(?) on OSX.
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 -
I am trying to create an alias which when given some argument will look for the folder with contains the argument as pattern. Let the alias name be gohf.
Now, I will be using this alias like gohf <some-pattern>, for eg. gohf testing.
Let's say i have the following alias in bash - alias ls='ls --color=auto' - and i want to call ordinary ls without options. Is the only way to do that is to unalias, do the command and then alias again? Or there is some nifty trick or workaround?