M
M
Maxim2016-03-18 22:05:36
linux
Maxim, 2016-03-18 22:05:36

How to get a tar file without paths and files/folders starting with a dot?

Shamanil does not work with this

tar -czvf backup.tar.gz -C /var/www/html  . --exclude='.[^/]*'

So it is taken without points
tar -czvf backup.tar.gz /var/www/html/*'
And so without paths but with points
tar -czvf backup.tar.gz -C /var/www/html .
It is necessary without paths and without points.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Moseychuk, 2016-03-19
@fshp

tar -czvf backup.tar.gz -C /var/www/html /var/www/html/*

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question