Score:1

No such file or directory - file is present

kp flag

enter code hereI do not understand why I am getting the "No such file..." error.

fstab is in home/andy/Downloads/

Here is what is relevant in my backup script.

# Backup fstab
cat /etc/fstab > home/andy/Downloads/fstab
tar -cvf fstab.tar home/andy/Downloads/fstab
rsync --progress -r -u fstab.tar $Backup_Directory
rsync --progress -r -u fstab.tar $Local_Backup_Dir

And the output.

Thunar_Settings.tar
10,240 100%    0.00kB/s    0:00:00 (xfr#1, to-chk=0/1) sending incremental file list
-rw-rw-r--         10,240 2022/12/01 22:27:27 Thunar_Settings.tar
/home/andy/bin/Backup_20_04.sh: line 79: home/andy/Downloads/fstab: No such file or directory
tar: home/andy/Downloads/fstab: Cannot stat: No such file or directory
tar: Exiting with failure status due to previous errors

I added the / to the appropriate places.

tar: Removing leading `/' from member names /home/andy/Downloads/fstab sending incremental file list fstab.tar

It creates the tar file and sends it to the 2 locations.

Score:1
ng flag

Your script uses the absolute path home/andy... but this is not a valid path.

Absolute paths must start with a /

So if your username is andy then the absolute path to your user's home folder would be /home/andy/...

fixit7 avatar
kp flag
Thanks a lot. I made the changes you suggested. And results are in my original post.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.