View Full Version : Why you should use the Command Line
Many new users are uncomfortable with the command line (CL). Maybe the text reminds them of their DOS days or maybe they are simply afraid of lots of text scrolling by them. Regardless, new users should learn simple ways to move around their machines so that they become comfortable. By learning the directory layout of your machine, you increase the chance of finding problems that you can then fix before they become a nightmare.
The first command that I showed my daughters was the ls command with the option -l. This simple list of files started to get them comfortable with the command line.
Eventually, you too will learn the ways of the CL.
Enjoy your adventure.
NinerFan
06-02-2003, 08:18 PM
When users begin to learn and play with the shell, one suggestion is to add to your .bashrc file the following:
alias rm='rm -i'
alias mv='mv -i'
alias cp='cp -i'
What that does is prompt for a yes/no confirmation before overwriting/deleting files.
I know some might find this an inconvienance, but, I prefer the safe than sorry approach.
In fact, using aliases is a very powerful method to accomplish frequent tasks.
You can chain several commands together into a single alias by seperating the steps with a semicolon. For example, suppose you have a client that sends you a diskette frequently, that contains a zip file that must be extracted. The graphical method may mean inserting the floppy, opening a file manager, copying the zip file somewhere, extracting the contents, moving them to a permanent location, and then deletes the zip file.
You can create a one time alias that does all those steps. The following illustrates the example:
alias getfiles='cd ~/tmp; cp /mnt/floppy/*.zip .; unzip *.zip; rm -f *.zip; mv * /PermanentLocation/'
So now, when that client send you a diskette, fire up a shell and type getfiles, rather than those other 20 steps.
vBulletin® v3.7.0 Beta 3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.