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 does grep v do?

568


What is grep r?

598


What happens when we execute a unix command?

608


What is the functionality of a top command?

628


Write a command to kill the last background job?

628






What command is used to check the current users?

602


Name the unix command to find how many days the server has been up.

621


Who wrote grep?

591


Does cp command overwrite files?

634


Describe the usage and functionality of the command rm –r * in unix?

833


What is ‘ps’ command for?

624


Can you explain a little bit about command substitution?

623


Which command is used to delete all files in the current directory and all its sub-directories?

680


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

2047


What are filter commands in unix?

559