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

What is grep in bash?

586


What is the general format of unix command syntax?

692


What is the comma to show the space allocation of files?

558


How does shebang work?

588


Explain command to display different lines that are found when compare two files?

676






How do I use grep to find a file?

580


Who invented grep?

651


What does sed command do in unix?

561


what is the advaantage of each user having its own copy of the shell?

2034


What is the command to find maximum memory taking process on the server?

670


What are grep patterns?

577


What does touch command do in unix?

726


What do chgrp command do?

590


What is time_t?

586


What is unix command line?

606