Skip to main content

7.1) Understanding Options


We have used a number of commands like ls, clear, cp, mv, etc. Many of these stand alone with no additional information, like ls or clear. Whereas cp requires you to name the file you want to make a copy of and give a new name or directory. Almost all Unix commands come with additional options.

For example, when using the ls command I often want to know more information than just the names of files and directories in my directory. I often want to know which are files and which are directories for instance, I want to know what the size of the files are, I want to know when they were created or modified, etc., etc.

If you use the ‘-F’ option (if it appears as a capital in the manual then use a capital when using the command) by typing:

ls -F

then this will classify files. The most useful thing to note from this –F option is that directories will be listed with a ‘/’ as a suffix, so if you have a directory called ‘storage’ then it will appear as ‘storage/’ and then you know it is a directory rather than a file.

[tippy title="Hint for Windows Users"]
Programmes that can run in MS Windows hava a '.exe' suffix. In Unix executables have a '*' suffix so an executable called 'runit' will appear as 'runit*' (Shell specific).
[/tippy]