I am using a live cd to take backup of a file.This was my problem.
Now I want to use tar
to backup a single file Phone academics
where I have accumulated other files and I want to create the backup in the same folderPhone cademics
at /media/ubuntu/af89d536-745d-4899-971b-27cba56930be/alpha/Desktop/Phone academics
.
I changed the directory using cd /media/ubuntu/af89d536-745d-4899-971b-27cba56930be/alpha/Desktop/Phone academics
which gives the result: bash: cd: /media/ubuntu/af89d536-745d-4899-971b-27cba56930be/alpha/Desktop/Phone: No such file or directory
So I opened terminal from the folder Phone academics so the directory changes to phone academics atomatically. Is this the right way to change? It now looks like:
If I use this code tar -cvf backupphoneacademics.tar/ media/ubuntu/af89d536-745d-4899-971b-27cba56930be/alpha/Desktop/Phone academics --exclude backupphoneacademics.tar
It gives:
tar: backupphoneacademics.tar/: Cannot open: Is a directory ; tar: Error is not recoverable: exiting now
What is wrong here? what do I do to take backup of that single file in the same folder?
tar
command may have a mis-placed slash and a missing escape:tar -cvf backupphoneacademics.tar /media/ubuntu/af89d536-745d-4899-971b-27cba56930be/alpha/Desktop/Phone\ academics --exclude backupphoneacsdemics.tar
– matigo May 31 '21 at 14:45tar: backupphoneacademics.tar: Cannot open: Permission denied tar: Error is not recoverable: exiting now
– Spectra May 31 '21 at 14:51.tar
file? Is it a writable location? – matigo May 31 '21 at 14:56