Question

Consider a scenario where you have the following files in directory Document1 Staffing Story1 Summary WorkRelated...

Consider a scenario where you have the following files in directory Document1 Staffing Story1 Summary WorkRelated What will be the output of the following command: ls -l S* | wc -l

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

please find the screenshot of the solution:

sh-4.4$ ls -1tr total 28 -rw-r--r 1 25827 25827 978 Feb 14 15:52 README.txt drwxr-xr-x 2 25827 25827 4096 Feb 14 15:53 Docume

Add a comment
Know the answer?
Add Answer to:
Consider a scenario where you have the following files in directory Document1 Staffing Story1 Summary WorkRelated...
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
  • Write a Java program that lists all the files in a directory and their subdirectories, that...

    Write a Java program that lists all the files in a directory and their subdirectories, that mimics the Unix ls command or the Windows dir command. Note that when a directory is encountered we do not immediately print its contents recursively. Rather, as we scan each directory, place any subdirectory in a List. After the directory entries are printed then process each subdirectory recursively. For each file that is listed, include the modification time, the file size, and if it...

  • Revision Question 3 on Linux. Please explain the shell script commands in the context of post...

    Revision Question 3 on Linux. Please explain the shell script commands in the context of post execution. You have just logged in and have a directory called "novel" in your home directory containing the following files: chapter1.docx chapter2.docx chapter3.docx draft.pdf save where "save" is itself a directory and contains the files Attributes.txt draft.pdf.1 draft.pdf.2 draft.pdf.3 indexA.txt indexB.txt list1.txt list2.txt a) Describe the results you would expect when executing the following shell commands: i) ls novel/save/*A* ii) ls novel/*r[23]* iii) rmdir...

  • As you know, Is lists all the files in a directory and wc counts words, characters,...

    As you know, Is lists all the files in a directory and wc counts words, characters, and lines. Which of the following operations counts the amount of files (and directories)? Select one: O b. Is wc -w c. Is 1I cat | wc -w In the picture an output of the command Is -I is shown. Which of the following statements is true? druxruxrux. 3 kuivi users 80 May 16 2001 dir ru-ru-rw-. 1 kuivi users 1696 Oct 19 1995...

  • Project 4-4 In this hands-on project, you make and view links to files and directories. Switch to...

    Project 4-4 In this hands-on project, you make and view links to files and directories.Switch to a command-line terminal (tty2) by pressing Ctrl+Alt+F2 and log in to the terminal using the user name of root and the password of secret.At the command prompt, type cd samples and press Enter. Next, type ls -F at the command prompt and press Enter. What files do you see? Next, type ls -l at the command prompt and press Enter. What is the link...

  • You have a bunch of text files in your home directory, and you are trying to...

    You have a bunch of text files in your home directory, and you are trying to find which ones contain the word "opportunity". What command would you type to search within all the files for the word "opportunity"?

  • Write a C program countFiles.c to be executed on the command line as follows: countFiles <directory> The program...

    Write a C program countFiles.c to be executed on the command line as follows: countFiles <directory> The program should count the (regular) files in the specified directory as well as all subdirectories and output the total number on the console. Files and subdirectories whose names .start with should be ignored! To do this, define a function int countFilesRec(char* dirName)that dirName returns the number of (regular) files in the directory and all the subdirectories. Call the function recursively to count the...

  • 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...

  • 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...

  • Write an awk script to print just the name and size of ordinary files (do not...

    Write an awk script to print just the name and size of ordinary files (do not include directories), one on each line. The output must be aligned as shown in the example below. First, analyze a typical output of the ls -l command to see what differentiates an ordinary file from a directory and which fields contain the file name and size information. Then, determine what the field separator is and whether the default field separator of awk will work,...

  • 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...

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