I am trying to create a new file(string) with todays date in a backup folder
string= `date '+%d%m%y'`
find [a-z]* [0-9]* [A-Q]* /home/SMB-2000/* -print |cpio -ovm > /home/bkups/$string
After excecuting I get the messege
# ./b2
250208
./b2: /home/bkups/: cannot create
Where am i going wrong?
Remove the ">" in the cpio command:
find [a-z]* [0-9]* [A-Q]* /home/SMB-2000/* -print |cpio -ovm /home/bkups/$string
Edit:
I think I'm wrong, you don't use the -p option so the redirection is correct.
Do you have write permission in the directories?
Regards
I am doing this as root user. Additionally I have ensured maximum permissions on bkups directory
The directory must be exist, try to make the directory before the find command:
mkdir -p /home/bkups/$string
Regards