To backup my document root (
/var/www/html/ I can execute):
zip -r ~/backups/all_zipped-$(date +\%F-\%T).zip /var/www/html/
The problem is that inside the created zip file, I get 3 base directories instead of 1:
The desired end state is to have only 1 base directory (the last one). In this case, of course,
html (and its inodes).
zip -r ~/backups/all_zipped-$(date +\%F-\%T).zip /var/www/html/* (note the
*), didn't help.
How to zip current directory without its entire path?