I am trying to create a compressed file of sublime text snippets. The snippets I want to include are in the subdirectory snippets of my current directory
All around the web, as far as I can see I should do
tar czf snippets.tar.gz -C snippets .
However, if I do that I get an archive, which looking at it from GNOME Nautilus, shows an archive with a directory named .
in it and the files within that directory.
I also tried (and -C snippets/
)
tar czf snippets.tar.gz -C snippets *
but then I get the following error
tar: snippets: Cannot stat: No such file or directory
tar: snippets.tar.gz: Cannot stat: No such file or directory
tar: supporting: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors
but the directory is definitely there and there doesn't seem anything wrong with its permissions
drwxr-xr-x 2 alan alan 12288 Aug 25 11:15 snippets
-rw-r--r-- 1 alan alan 45 Aug 25 11:26 snippets.tar.gz
drwxr-xr-x 13 alan alan 4096 Aug 25 09:59 supporting
I'm running debian testing, so I guess there is a possibility that tar is broken at the moment, but I rather doubt it, given the system is so dependant on it. So what am I doing wrong>
./
always represents the current directory, it's totally normal. Is this your first meeting with *nix? :->