5 Simple Bash Tips, Part III
Aug 13, 2009, 12:02 (0 Talkback[s])
No-Size-Fits-All! An Application-Down Approach for Your Cloud Transformation REGISTER >
[ Thanks to Chris7mas for this link.
"cd - is the same as cd $OLDPWD, where the $OLDPWD
variable holds the previous working directory. You can also alias
this to something like:
alias back='cd -' # or alias back='cd $OLDPWD'
"If you've just opened a new Bash session or sourced .bashrc,
the $OLDPWD variable will be unset. Also, follow this discussion on
reddit which is a great resource on this matter.
2. Make copies of files easier
This one is especially useful for creating backup files, but not
only. To fasten up rename commands like mv file1 file1bak you can
use something like:"
- Bash Shell Course: Text Editors(Aug 12, 2009)
- Run Multiple Debian Versions Simultaneously(Aug 11, 2009)
- Video Slide Shows with Impress(Aug 08, 2009)
- Ten essential commands for Linux tasks(Aug 07, 2009)
- Screen : 10 Window Settings(Aug 07, 2009)
- Tech Tip: View Config Files Without Comments(Aug 06, 2009)
- Bash, in Color(Aug 03, 2009)
- Just because it's pretty, doesn't mean it's easier(Aug 03, 2009)
- 10 ergonomic keyboards that actually do their job(Jul 30, 2009)