Write linux code to recursively copy all files in the current directory to the backup001 directory. Make sure the code also returns what files have been copied. cp. . /backup 001

Respuesta :

Answer:

# cp -r /h1/user4/h1-folder/ /h2/backup001

# cp -r [folder address to be copied] [destination address]

The above command copies all the files from one directory to another directory recursively.

# ls -lh /h2/backup001

Now if you want to check whether all files have been copied or now, you can use the ls command. This will list all the files in the new directory. -lh means human-readable long list format.

Explanation:

cp is the copy command that copies all the files in one directory or folder to the new directory of the folder. And ls command list all the files stored in a current directory or folder.