what will be the output of ls ~/..

Answer Posted / shubhadip

It depends on your HOME directory. " ~ " sign denotes your
HOME directory and " /.. " for HOME's parent directory.

By default user's HOME directory is /home/user_name . So
at that time ls ~/.. command will show the contents of
directory /home .

But if somebody has set a different HOME directory
(e.g. /opt/apps/usr). Then the command will show the
contents of directory /opt/apps .

I used "HOME" for the environment variable and "home" for
directory name. These 2 are completely different thing.

If you want to know what is your HOME directory. Then you
can type echo $HOME

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can you see the command line history?

586


What is $0 bash?

653


Write a command that will find all text files in a directory such that it does not contain the word "amazing" in any form (that is, it must include the words amazing, amazing, or amazing)?

962


What is s and g in sed command?

561


Enlist some filename manipulation commands in unix.

556






How do I use nslookup?

577


What is the pipe command?

580


Which unix command to make a new directory?

593


What is grep command in unix with examples?

612


What does touch command do in unix?

733


How to display no of records in oracle using unix command?

590


What does #!/ Bin sh do?

595


What does grep v grep do?

556


What are the general commands in using unix os for a beginner?

581


What are some command words?

569