Question

What is a single command that concatenate all files in the current directory that end in...

What is a single command that concatenate all files in the current directory that end in .c into a single file all.c in the backup directory?

Assume the backup directory is a child of the current directory.

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

cat *.c > backup/all.c

It concatenates all the files with .c extension, and put the result in backup directory.

Add a comment
Know the answer?
Add Answer to:
What is a single command that concatenate all files in the current directory that end in...
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
  • Displays the names of the non-hidden files and directories in the current directory, or another directory,...

    Displays the names of the non-hidden files and directories in the current directory, or another directory, along with creation time, and size of file. In case of subdirectories, it displays the word <DIR> instead of file size. At the end, the command should display the total number of files in the directory, the total file size, and the number of sub-directories. Examples: LodgherDir (displays info of all files and directories in current directory) LodgherDir c:\LFromDir (displays info of all files...

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

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

  • Suppose that you wished to copy all of the text files from your fileAsst directory and...

    Suppose that you wished to copy all of the text files from your fileAsst directory and all of the files from your fileAsst/Planes directory into your current directory (without typing out the name of each individual file). What command would you give to make that copy?

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

  • 20. Write the DOS command to erase a file named FILEBILL which is stored in the...

    20. Write the DOS command to erase a file named FILEBILL which is stored in the sub-directory named MYFILES located at the root of drive C. 21. Write the DOS command to return you to the root of drive C if your current directory is C:\TEACHING OPSYS\SUMM 22. Write the DOS command to erase all the files on drive A. 23. Write the DOS command to delete a subdirectory named DIRFRED which is located at the root of drive C....

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

  • 2. Answer the correct command instructions to complete the following: a. What is the admin account...

    2. Answer the correct command instructions to complete the following: a. What is the admin account (username) you created in Lab 1 and write down its home directory (full folder name)? [0.5 pts) b. Assume the following directory structures in your home directory: • /home/(username)/ — use your own (home directory) • /home/(username) /Dir1.0/Dir1.1/ • /home/(username) /Dir2.0/Dir2.1/ in your home directory, create directories Dir1.0 & Dir 2.0, then create directories Dirl.1 & Dir2.1 inside other directories according to above. [1...

  • Reading and Writing Files in a Directory Create a program that provides a listing of all...

    Reading and Writing Files in a Directory Create a program that provides a listing of all the files in a directory. The program should be a Java application that accepts a single argument into the args array of the main() method. This argument identifies the name of a directory. The application should make sure that this filename really does identify a directory and then list all of the files in the directory. For each file, list whether the file is...

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

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