View Hidden Files and Folders


ls -a

Up to this point, you've been viewing the visible files in directories, but don't forget that many directories contain hidden files in them as well. Your home directory, for instance, is just bursting with hidden files and folders, all made invisible by the placement of a . at the beginning of their names. If you want to view these hidden elements, just use the -a option (or --all).

$ ls -a ~/ .              .gimp-2.2     .openoffice.org1.9.95 ..             .gksu.lock    .openoffice.org1.9 .3ddesktop     .glade2       .openoffice.org2 .abbrev_defs   .gnome        .opera .adobe         .gnome2_private pictures 


You should know several things about this listing. First, ls -a (the a stands for all) displays both hidden and unhidden items, so you see both .gnome and pictures. Second, you'll always see the . and .. because . refers to the current directory, while .. points to the directory above this one, the parent directory. These two hidden files exist in every single folder on your system, and you can't get rid of them. Expect to see them every time you use the -a option. Finally, depending on the directory, the -a option can reveal a great number of hidden items of which you weren't aware.



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