Find the answer to your Linux question:
Results 1 to 3 of 3
Hi everybody. I've been messing with options for ls and started using the -d option ( how very useful it is too) but if i use it as a single ...
  1. #1
    Linux Newbie the bassinvader's Avatar
    Join Date
    Jun 2006
    Location
    Europe
    Posts
    168

    ls -d

    Hi everybody.

    I've been messing with options for ls and started using the -d option ( how very useful it is too) but if i use it as a single option on a directory ie....

    ls -d /my directory
    i'll get a dot (.) displayed and thats all. So i i guess this is the config file from within the directory but why does it give me this? And what exactly is in the . and .. directories anyway?

    " I didn't know it was a picture of his wife! I thought it was a publicity shot form Planet Of the Apes."

  2. #2
    Linux Engineer Zelmo's Avatar
    Join Date
    Jan 2006
    Location
    Riverton, UT, USA
    Posts
    1,001
    A single dot is an alias for the current directory; two dots represent the parent directory.

    Try just "ls ." and see how the output compares to "ls" or even "ls $PWD".
    Stand up and be counted as a Linux user!

  3. #3
    Linux Enthusiast flipjargendy's Avatar
    Join Date
    Aug 2004
    Location
    Xanadu, Titan, Saturn
    Posts
    610
    You can also do 'cd ..' and it will go one directory up. Pretty useful.
    Running Linux Since 2001®
    Registered Linux User #430868 - Since 9•12•06

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...