Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- test:
- total 16
- drwxr-xr-x 2 db2root1 db2iadm1 4096 Jan 18 16:52 archive
- -rw-r--r-- 1 db2root1 db2iadm1 34 Jan 18 16:38 file1.txt
- -rw-r--r-- 1 db2root1 db2iadm1 34 Jan 18 16:38 file2.txt
- drwxr-xr-x 2 db2root1 db2iadm1 4096 Jan 18 17:04 subdir
- test/archive:
- total 0
- test/subdir:
- total 4
- -rw-r--r-- 1 db2root1 db2iadm1 34 Jan 18 16:38 file3.txt
- tar --remove-files --exclude file1.txt --exclude archive -cvzf /test/archive/test.tar.gz /test
- tar: Removing leading `/' from member names
- /test/
- /test/subdir/
- /test/subdir/file3.txt
- /test/file2.txt
- tar: /test: Cannot rmdir: Directory not empty
- tar: Exiting with failure status due to previous errors
- ( cd /test; tar --remove-files --exclude file1.txt --exclude archive -cvzf archive/test.tar.gz * )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement