2

Out of curiosity I typed cd --help to see if there were any extra things you can do with changing directory, and it came up with

cd: usage: cd [-L|[-P [-e]] [-@]] [dir]

What does each option do? I tried doing a DDG search but found nothing on these extra parameters.. could someone explain them before I try 'em and find that -L deletes all files found in that directory but doesn't delete the dir itself or something like that haha :-)

5
  • 2
    I know we're not supposed to say it, but this is classic RTM Mar 3, 2015 at 14:32
  • RTM? A term I'm not familiar with... Mar 3, 2015 at 14:42
  • "Read the Manual" :)
    – roadmr
    Mar 3, 2015 at 14:49
  • And just to clarify, the square brackets around the flags (e.g. [-L]), should not be typed, they are just there to show that the -L flag is optional.
    – IQAndreas
    May 25, 2015 at 2:44
  • 1
    It helps to know ahead of time that cd is a shell builtin command, which means that its help is available with the help command instead of man. May 25, 2015 at 21:45

1 Answer 1

7

Try help cd:

 Options:
    -L  force symbolic links to be followed: resolve symbolic links in
    DIR after processing instances of `..'

    -P  use the physical directory structure without following symbolic
    links: resolve symbolic links in DIR before processing instances
    of `..'

    -e  if the -P option is supplied, and the current working directory
    cannot be determined successfully, exit with a non-zero status

    -@  on systems that support it, present a file with extended attributes
        as a directory containing the file attributes
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .