Difference between revisions of "Ls"
Harry Kuhman (Talk | contribs) m (Reverted edit of Meep, changed back to last version by UnderScore) |
(alboczelc4ts) |
||
Line 1: | Line 1: | ||
+ | sitcnariccn | ||
[[ls]] The [[ls]] command is used to list files on [[linux]] based systems. [[GUI]] file managers are nice to use. However, [[ls]] can be used as a fast tool where a user does not have to click themselves to death. | [[ls]] The [[ls]] command is used to list files on [[linux]] based systems. [[GUI]] file managers are nice to use. However, [[ls]] can be used as a fast tool where a user does not have to click themselves to death. | ||
Revision as of 03:03, 11 July 2008
sitcnariccn ls The ls command is used to list files on linux based systems. GUI file managers are nice to use. However, ls can be used as a fast tool where a user does not have to click themselves to death.
ls -l
List files in a directory in long directory information format.
ls -lrt
List files in a directory in long directory information format; reverse order; sorted by time.
ls -lart
List files in a directory in long directory information format; a including hidden, ., dot files and directories; reverse order; sorted by time.
ls -l | egrep -i '^(d|l)'
The reason why you would want to venture into the command line world occurs when you start to pipe, |, the ls output into another command for customized list of files.
ls > myfiles.txt
This is one of the most useful ls commands. It allows you to redirect ls's output to a file with the name of your choice. The data in the file can be manipulated with your favorite editor. ls puts each file or directory on a newline in the file. Please see redirection for more information.