Linux commands
| Command: ls |
Show listing of current directory http://www.opengroup.org/onlinepubs/9699919799/utilities/ls.html |
||||||||||||||||||||||||||||||||||||||||||||||
|
Description of commmand / detailed explanation:
Files are documents, images or programs on your computer. Directories are like boxes that hold the files. You are always considered to be within some directory. Most of the time, commands only act on the files within the directory in which you are located. So, when you list using ls, you get a list of all of the files in the directory that you are in, not all of the files in the computer.There may be no files visible in your home directory, in which case, the UNIX prompt will be returned. Alternatively, there may already be some files inserted by the System Administrator when your account was created. ls does not, in fact, cause all the files in your home directory to be listed, but only those ones whose name does not begin with a dot (.) Files beginning with a dot (.) are known as hidden files and usually contain important program configuration information. They are hidden because you should not change them unless you are very familiar with UNIX!!! ls has a miriad of options, check the usage for its options |
|||||||||||||||||||||||||||||||||||||||||||||||
|
Command options:
|
|||||||||||||||||||||||||||||||||||||||||||||||
How to use it: ls [-ACFRSacdfiklmnpqrstux1] [-H|-L] [-go] [file...] |
|||||||||||||||||||||||||||||||||||||||||||||||
|
Typical Usage Examples:
% ls -a - As you can see, ls -a lists files that are normally hidden.
![]() ls ~ - List the contents of your home directory by adding a tilde after the ls command. ls / - List the contents of your root directory. ls ../ - List the contents of the parent directory. ls */ - List the contents of all sub directories. ls -d */ -Only list the directories in the current directory. |
|||||||||||||||||||||||||||||||||||||||||||||||
|
Available in: debian
fedora gentoo suse mandriva ubuntu |
Related commands: |
||||||||||||||||||||||||||||||||||||||||||||||
