Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 2219  / 3 Years ago, mon, october 25, 2021, 3:19:57

Following command sudo tar jcf /datos/backup/news/news.tar.bz2 -C /var/www/news news is giving "tar: Cann't stat: No such file or directory" error.



How can I solve this problem?



As it had been answered in my previous question I am using -C option in order to skip leading directories. It was working in one Ubuntu server and now in my Ubuntu Desktop it is giving that error message.


More From » backup

 Answers
7

If you are using -C that means you are changing directory there. Hence, if you want to tar a directory named news in /var/www you must use:



sudo tar jcf /datos/backup/news/news.tar.bz2 -C /var/www/ news

[#42329] Tuesday, October 26, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
mugustered

Total Points: 193
Total Questions: 123
Total Answers: 108

Location: Bermuda
Member since Wed, Mar 22, 2023
1 Year ago
mugustered questions
Sat, Nov 19, 22, 07:03, 1 Year ago
Sun, May 29, 22, 11:53, 2 Years ago
Fri, Dec 23, 22, 15:02, 1 Year ago
;