View Contents As a Comma-Separated List


ls -m

Another option for those who can't stand columns of any form, whether it's one or many, is the -m option (or --format=commas).

$ ls -m ~/ bin, Desktop, docs, iso, music, pix, src, videos 


Think of the m in -m as a mnemonic for comma, and it is easier to remember the option. Of course, this option is also useful if you're writing a script and need the contents of a directory in a comma-separated list, but that's a more advanced use of a valuable option.



Linux Phrasebook
Linux Phrasebook
ISBN: 0672328380
EAN: 2147483647
Year: 2007
Pages: 288

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net