« Been there done that, failed it | Home | command line tools [cp] »
Command line tools [ls]
By Mark | June 15, 2008
Here I will describe usage of the basic Linux command line tools.
LS ls is off course a very basic tool. It will show you the listing in a directory. “ls -C” will show you the column version output. “ls -A” will show you all but the toplevel dir and cwd dir presented by the “.” and “..”. That keeps scripts from complaining they can’t work on cwd. For instance if you do a:”
for file in $(ls -a); do rm -rf $file ; done”
You get a:
rm: cannot remove directory `.'
rm: cannot remove directory `..'.
When you exclude “.” and “..” with an “-A” all is well.
Topics: Perequisite Skills | No Comments »
