what will be the output of ls ~/..

Answers were Sorted based on User's Feedback



what will be the output of ls ~/....

Answer / munni155

it will list the contents of home directory

Is This Answer Correct ?    58 Yes 20 No

what will be the output of ls ~/....

Answer / phil

It will list the files and directories of the current user
parent's login directory

i.e.
If the current user smith login directory is "/home/smith",
then the parent's login directory is "/home"

In this example, the files and directories in "/home" are
listed.

Is This Answer Correct ?    35 Yes 8 No

what will be the output of ls ~/....

Answer / dinesh

It will show the content of the /home directory

Is This Answer Correct ?    28 Yes 13 No

what will be the output of ls ~/....

Answer / naveen

it will shows all users in serversystem

Is This Answer Correct ?    27 Yes 13 No

what will be the output of ls ~/....

Answer / phil

It will list the files and directories of the current user
parent's login directory

i.e.
If the current user smith login directory is "/home/smith",
then the parent's login directory is "/home"

In this example, the files and directories in "/home" are
listed.

Is This Answer Correct ?    12 Yes 4 No

what will be the output of ls ~/....

Answer / mohan

presently working in any directory.put this command " ls
~/.. "

Show the " /home " file system ,files and directory.


out put:

bash-3.00# pwd
/tmp
bash-3.00# ls ~/..
1 asjain13 dipankar ib082696 kedar
nathan orasit remedy santosh vijay
abc aslam divek ib082721 kiran
nayagam oratest ruba santoshw vijayk
appldev atul dj ib082801 lost+found
nilesh prakash sachin srinivas vinayak
appltest dan esaadmin ib083208 manmohan
nileshu prasanth sachinj sumit vsacomm
appluat dcops gopi jomy mohan
oradba prem sai sunila yogesh
ashok deepali ib081370 kamal monitor
oradev ramesh sandeepb thomasm
bash-3.00# cd /home
bash-3.00# pwd
/home
bash-3.00# ls
1 asjain13 dipankar ib082696 kedar
nathan orasit remedy santosh vijay
abc aslam divek ib082721 kiran
nayagam oratest ruba santoshw vijayk
appldev atul dj ib082801 lost+found
nilesh prakash sachin srinivas vinayak
appltest dan esaadmin ib083208 manmohan
nileshu prasanth sachinj sumit vsacomm
appluat dcops gopi jomy mohan
oradba prem sai sunila yogesh
ashok deepali ib081370 kamal monitor
oradev ramesh sandeepb thomasm
bash-3.00#


By
mohan.S
mohan4295@gmail.com

Is This Answer Correct ?    8 Yes 2 No

what will be the output of ls ~/....

Answer / sandesh

It prints the directories and file which is in your parent
directory.
If u are logged in root ..it will show contents of /
directory.

If u are logged in /home/sandesh ....it will show contents
of /home directory .

~/ means the user login directory.

Is This Answer Correct ?    6 Yes 3 No

what will be the output of ls ~/....

Answer / vikas sharma

ls ~/..

displays the list of /
i.e all folder like usr bin opt var root proc etc..

break this command
ls ~ [list the /root]
cd .. [cd to /]
ls [list of /]

Is This Answer Correct ?    6 Yes 4 No

what will be the output of ls ~/....

Answer / asish

i mean the contents of the parent directory of your home
directory.

Is This Answer Correct ?    2 Yes 0 No

what will be the output of ls ~/....

Answer / 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

More Unix Commands Interview Questions

What are bash commands?

0 Answers  


what do you understand by 'building block primitive'?

3 Answers   Infosys,


How to see unused port number in Solaris?

2 Answers   HCL,


what is difference between unix and linux?

6 Answers   IBM, Shell, Wipro,


if we create a file, in that 10 rows(means 1,2,....9,10 like). i want 7 row exactly, which command use in unix? plz send this question.

28 Answers   TCS,






What is the use of touch command in there?

1 Answers   Accenture,


How to view the hidden files in /etc directory?

10 Answers  


Explain command to view process running?

0 Answers  


What is the difference between grep and grep?

0 Answers  


how will u execute a file in unix

8 Answers   QA,


distinguish between physical addresses and logical address?

23 Answers   College School Exams Tests, CTS, Infosys, SAX, TATA, TCS,


In UNIX, what is the command to kill a process?

10 Answers  


Categories