The ls Command

The ls command brings with it a lot to discuss. I haven't yet described the options to ls, yet we have already used this command and the -l option as part of the file command discussion. You can't do much on a UNIX system without ls, so I'll cover it now. The best way to cover the most important options to ls is to show examples. I do just that in the upcoming description of the ls command.

ls

The following is an example of ls without any options other than the directory to list:

# ls /home/denise 27247b.exe 410pt1.exe 410pt2.exe 41ndir.exe 41nds1.exe 41nds4.exe 41nwad.exe 41rtr2.exe HPDA1.EXE Mail N3212B6.EXE SCSI4S.EXE clean clean2 clean3 content.exe dsenh.exe eg1 eg2 en0316bz.exe en0316tb.exe explore.exe flexi_cd.exe fred.h ...

Get HP-UX 11i System Administration Handbook and Toolkit, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.