How to exclude files from tar?
Hello,
I've been trying to exclude some hidden files from a tar but without success.
I must be doing something wrong but I couldn't detect the error:
I'd appreciate if you can help.
I've been trying to exclude some hidden files from a tar but without success.
I must be doing something wrong but I couldn't detect the error:
I'd appreciate if you can help.
user1@bw5n003:/tmp $ ll -d test
drwxr-xr-x 3 user1 staff 228 Jul 25 15:24 test
user1@bw5n003:/tmp $ ll -a test
total 48
drwxr-xr-x 3 user1 staff 228 Jul 25 15:24 .
drwxrwxrwt 5 root sys 464 Jul 25 15:34 ..
drwxr-xr-x 2 user1 staff 69 Jul 25 15:11 .snapshot
-rw-r--r-- 1 user1 staff 7 Jul 25 15:11 test1
-rw-r--r-- 1 user1 staff 14 Jul 25 15:12 test2
-rw-r--r-- 1 user1 staff 13 Jul 25 15:24 test3
user1@bw5n003:/tmp $ cat -et exclude-file
test3
.snapshot
user1@bw5n003:/tmp $ tar cvfX z.tar exclude-file test
1