Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Are the commands' options case sensitive? i.e.

I did

rm -r directory


rm -R directory

And I got the same results, whereas when I did

ls -r directory


ls -R directory

I got different answers.

share|improve this question

3 Answers 3

up vote 2 down vote accepted

This is what man pages are for



-r, --reverse reverse order while sorting

-R, --recursive list subdirectories recursively



-r, -R, --recursive remove directories and their contents recursively

So with the command rm, -r and -R are the same, but not so with ls

share|improve this answer

Yes, almost everything in Linux is case sensitive.

For example, in your ls command,

   -r, --reverse
      reverse order while sorting

   -R, --recursive
      list subdirectories recursively

Also, like in ln:

   -s, --symbolic
      make symbolic links instead of hard links

   -S, --suffix=SUFFIX
      override the usual backup suffix

However, sometimes the upper and lowercase letter options are the same, like in rm:

   -r, -R, --recursive
      remove directories and their contents recursively

It depends on the command. To best find out if upper and lowercase make a difference, always consult the man pages of a command.

share|improve this answer

The cases only matter if there is another argument in the opposite case. This is usually how it works, so I would keep the case of the argument the same as what command you want

share|improve this answer
Not true, depends on the command –  bodhi.zazen Jun 7 '13 at 21:00

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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