Question

From the /root directory try the following “ls” command, examine the results and explain. a) ls...

From the /root directory try the following “ls” command, examine the results and explain.

a) ls /.*

b) ls .*/

c) ls /*/ -d

d) ls /* -d

e) ls * -d

0 0
Add a comment Improve this question Transcribed image text
Answer #1

The ls command in general is used to list out the contents of a particular directory in which we are correctly working in. Using -d will just list out the directory and their contents with them.

a) ls /.* - this will list out all the files which have a / as a last letter with any type of extension and it will thus actually look for sub files in the different directory present in the current directory.

b) ls .*/ - this will list out all the files in the present directory and will look into the directories as well for files.

c) this will go 2 level deep into the directory and list out all the files present their and thus not going any further.

d) this will go 1 level deep into the directory and list out all the files present their and thus not going any further.

e) work similar to the ls command.

Add a comment
Know the answer?
Add Answer to:
From the /root directory try the following “ls” command, examine the results and explain. a) ls...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • d to the /etc directory. Execute the following command. ls -l au*.[mn]* The output is the...

    d to the /etc directory. Execute the following command. ls -l au*.[mn]* The output is the following: -rw-r--r-- 1 root root 675 Jan 24 19:04 auto.master -rw-r--r-- 1 root root 524 Mar 22 2012 auto.misc -rwxr-xr-x 1 root root 1374 Mar 22 2012 auto.net This is exactly the output I was hoping for. What function are the [ ] performing? They look good and balance the command string. The uniquely match the m and n characters to ensure only the...

  • Task 1: Using the adduser Command Execute the following commands in the root command-line environment: #...

    Task 1: Using the adduser Command Execute the following commands in the root command-line environment: # ls /home # adduser newuser1 # ls /home Contrast the contents of home before and after the adduser command. ? ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- # cd /home/newuser1 # ls -al # tail -n 5 /etc/passwd What is the absolute path of newuser1's home directory? ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- What is the default shell for newuser1? ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- # tail -n 5 /etc/shadow Contrast the newuser1 record with your...

  • a) How would you use the ls command to display all of the files/directories in the...

    a) How would you use the ls command to display all of the files/directories in the directory ‘/sbin’ that start with ‘bl’? b) How would you use the ls command to display all of the files/directories in your current directory that contain the word ‘grade’ somewhere in the name and end with ‘.pdf’? c) How would you use the ls command to display all of the files/directories in your current directory that are any two characters followed by the file...

  • do numbers 4-8 4. Given any directory, use the Is command to display: • all files...

    do numbers 4-8 4. Given any directory, use the Is command to display: • all files and sub-directories starting with the letter "D" (note do not list anything in any sub-directory) • its immediate sub-directories (sub-directories only, and no other ordinary files) its immediate hidden sub-directories only - take a screenshot (#3-3) that clearly shows the command and the result. 5. Assume that the following files are in the working directory: $ ls intro notesb ref2 section 1 section3 section4b...

  • Linux/Fedora: Write the commands required for the following tasks. Try out each command on your system...

    Linux/Fedora: Write the commands required for the following tasks. Try out each command on your system to ensure that it is correct: a. Make a hierarchical directory structure under /root that consists of one directory containing three subdirectories. b. Copy two files into each of the subdirectories. c. Create one more directory with three subdirectories beneath it and move files from the subdirectories containing them to the counterparts you just created. After you have completed these three steps at the...

  • Open Command Prompt typing CMD command in your Search window. Change the directory from current to...

    Open Command Prompt typing CMD command in your Search window. Change the directory from current to root (C:). Make a new directory called CIS165_Your Last Name (example: CIS165_Nossa). Within this directory, make subdirectories called Can1 and Can2. Verify the created directory and subdirectories using particular command. Under Can1 subdirectory creates three files called Jam.txt, Milk.txt and Juice.txt. Verify that you created these files using particular command. Move Jam.txt file from the Can1 subdirectory to the Can2 folder. Compare using special...

  • 1. Navigate to your home directory by typing cd. Now type ls and notice that there...

    1. Navigate to your home directory by typing cd. Now type ls and notice that there is a subdirectory called Downloads. Now navigate to the root of the file system by typing cd /. From here, which single command would you use to navigate directly to the Downloads folder that is located in your home directory? The output of the command would be as follows: 2. From the Downloads directory which single command would you use to navigate back up...

  • You are working with the file directory of a Windows XP computer from the command line,...

    You are working with the file directory of a Windows XP computer from the command line, and you use the md command to create a new directory in your My Documents directory. What command switch can you issue to confirm that the new directory was created? A. Just use the dir command to view all of the directories and files in the My Documents and look for the name of directory you just created B. dir /new C. dir /bn...

  • Question 2 0/1 point (graded) What happens when you remove a directory using the command rm...

    Question 2 0/1 point (graded) What happens when you remove a directory using the command rm -r? You cannot remove a directory using the rm command. You permanently remove the entire directory, including all files and subdirectories. You move the entire directory to a trash folder, but it can be restored later. You get a warning message asking if you want to proceed, then you delete the directory. incorrect Answer Incorrect: Try again. Unix does not warn you before permanently...

  • QUESTION 1 From YOUR home directory, execute a find command string that will locate the file...

    QUESTION 1 From YOUR home directory, execute a find command string that will locate the file called resolv.conf. Include the -exec flag in the find command to cat the file to the screen. Begin your find search from the letc directory Select the correct find command string below that will accomplish this. find /etc-name 'resolv.conf -cat D find /etc-name 'resolv.conf -exec cat 0 find. -name 'resolv.conf -exec cat 0\ find /-name 'resolv.conf' -exec cat 0 QUESTION 2 What find command...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT