Home > OS >  The tar to delete the source file
The tar to delete the source file

Time:11-23

Because business needs, want to finish the file in a command tar and delete the original files at the same time
After the execution down
The tar - CVZF/xx/yy/data - backup. Tar. Gz - remove files - C/aa/daily - backup/.
Will/aa/daily - backup files under/all packaging and backup to xx/yy//delete the original file after

However, the execution of an error the following
Tar:/aa/daily - backup/. : always rmdir: Invalid argument

Obviously I don't no will attempt to delete a folder,, can you tell me how to correct

CodePudding user response:

The tar - CVZF/xx/yy/data - backup. Tar. Gz - C/aa/daily - backup/. & amp; & Rm - rf/aa/daily backup/*

CodePudding user response:

reference 1st floor lyd_2020 response:
tar - CVZF/xx/yy/data - backup. Tar. Gz - C/aa/daily - backup/. & amp; & Rm - rf/aa/daily backup/*

Use the remove - files can assure you delete object must be the object, the tar use & amp; & Can guarantee consistent

CodePudding user response:

One can use the command between empty, the tar command is equivalent to can be divided into two parts,
Recommend a Linux technology with Linux information website: Linux academy: https://www.linuxrecord.com/
  • Related