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

User Gravstar
by
2.7k points

1 Answer

6 votes

Final answer:

Use the 'cp' command to copy all text files from 'fileAsst' with 'cp fileAsst/*.txt .' and all files from 'fileAsst/TweedleDee' with 'cp fileAsst/TweedleDee/* .' to copy them into the current directory.

Step-by-step explanation:

To copy all of the text files from your fileAsst directory and all files from your fileAsst/TweedleDee directory into your current directory without specifying individual file names, you would use the cp (copy) command in the terminal on a Unix-like operating system. Here's how you can do it:


  • For all text files in the fileAsst directory: cp fileAsst/*.txt .

  • For all files in the fileAsst/TweedleDee directory: cp fileAsst/TweedleDee/* .

This will copy all files with a .txt extension from the fileAsst directory and all files from the fileAsst/TweedleDee directory to the current working directory, represented by a single period ..

User Gregory Fowler
by
3.6k points