2

I can see there are a lot of command line options in Ubuntu.

For example: the -l and -v options in sudo fdisk -l and sudo shred /dev/sdb1 -v .

Does anyone know where I can find all of the options with their functions?

I've used many commands, these make sense, but the commands' options do not. I would like to know about them.

  • I have no clue what you are looking for, and I am afraid I am not the only one. Could you explain what is your goal? – Jacob Vlijm Nov 15 '14 at 19:37
  • No i mean: you have one command with the iteration -l and another with the same -l. What do these mean? What does the l or v or any letter stand for in command lines? How do i know which one to use in commands? – Tubuntu Nov 15 '14 at 19:38
  • 1
    Ah, I think you are not using the word iteration correctly :). The options and their meaning depends on the application (command). run in a terminal e.g. man ls, there you see what you are looking for (I think) – Jacob Vlijm Nov 15 '14 at 19:45
  • The answer from Thomas.W was very clear. I've marked it as an answer. – Tubuntu Nov 15 '14 at 20:15
  • Lots of commands also have cheat sheets. Here is a decent list with options: inasp.info/uploads/filer_public/2014/08/29/… – Rinzwind Nov 15 '14 at 20:20
2

The acceptable flags for programs, and what those flags do, differ from program to program. Because the -v or -l flags (or any flags, for that matter) will vary from program to program, it is best to read the manpages for each application to figure out what does what.

In your case, you specify fdisk and shred. Try reading the manpages for each. (man fdisk and man shred)

0

For a simple list of the arguments and what they do you can usually run command --help. Most commands show the most common or useful arguments (like -l) when run with --help or -h. The help page also shows what the command does. It would be useful if just want to know what the command does in one line instead of a whole paragraph.

While man command would show a lot more information. I find it easier to run it with the --help as it is easier to find what you are looking for quickly. You could use command --help if you already know what the command does and just need to look for the correct argument to use and man command when you want to know what the command does and a lot of other information not shown in the help page.

Some programs may not have the help page in which your only option would be to see the manpages.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.