Bash Command Line Pro Tips
Rate it:
Open Preview
23%
Flag icon
enable it globally by uncommenting the the appropriate lines in /etc/bash.bashrc.
26%
Flag icon
Your previous working directory is stored in an environment variable named $OLDPWD.
34%
Flag icon
run another command against the last item on the previous command line.  To access that item in your current command, use "!$".
35%
Flag icon
!$
47%
Flag icon
Surrounding a command with backticks is the older style and is being replaced by the dollar sign syntax.
48%
Flag icon
$(date +%F)
72%
Flag icon
$ sudo cp usb_modeswitch.conf !#:2.bak
72%
Flag icon
usb_modeswitch.conf  usb_modeswitch.conf.bak
75%
Flag icon
$ echo "alias grpe='grep'" >> ~/.bash_profile
76%
Flag icon
alias ct='column -t'
77%
Flag icon
alias d='date +%F'
78%
Flag icon
alias ls='ls --color=auto'
78%
Flag icon
alias grep='grep --color=auto'
78%
Flag icon
alias tree='tree -C'
78%
Flag icon
alias utc='TZ=UTC date'