cannot stat folder when moving from a bash script

Viewed 15

Lots of questions like this one but none of them have helped and i've already killed a day on this single command.

Basically I need to understand how I can mv a folder into a subfolder in the same directory from a bash script.

To isolate this problem as much as possible i made the following movetest.sh:

sudo mv /home/zoctavous/vault/repos/work/recup_dir1000/ /trash/

All the folders specified exist and there are no folders that are currently named this. All I get in response is mv: cannot stat '/home/zoctavous/vault/repos/work/recup_dir1000/': No such file or directory

please help :(

1 Answers

I figured out my issue... I was deleting part of the filename farther up in the script that it was a part of.

/home/zoctavous/vault/repos/work/recup_dir.1000/ is the actual directory name.

the variable for the directory was being stored as shown above /home/zoctavous/vault/repos/work/recup_dir1000/

Related