I'm new in the use of the terminal. I have seen in a video that uses ls -al and I don't know what it is. I have found that ls -a is to list all the files even the hidden but I cannot find what does ls -al means. In the same terminal I write man ls -al and it says man: "invalid option -- l" So:
- What does ls -al mean ?
- Where can I this kind of information. Is there any kind of manual or tutorial for very beginners like me ?
3 Answers
ls lists all the files in a folder
ls -a lists all the files, including hidden files
ls -l lists all the files, in "long format" which basically tells you anything you needed to know about the files
ls -al is a combination of ls -a and ls -l
You can find more information about a command by typing man <command>, ex: man ls will give you more information about ls. To exit man hit q.
The command ls is for listing directory contents or file information. The option -a if for listing all files. The option -l means long listing, more detailed information. When you combine them in ls -al you should get the long listing of all files, including hidden files.
If you google "Unix beginner tutorial guide" you should come up with a lot of usable sites to learn from.
From the error you are getting, the - you are placing is not the right kind. This is possibly from copying and pasting the command from elsewhere.
2-ameans include all files, including the current directory, parent directory and files whose names begin with a dot.-lmeans display in long format.
To find out how the arguments affect the output of a command, use man command to see the documentation for the command. For example, man ls.