This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
Hello all
I am working on a synology DS224 i have created the task of deleting files and directories for the defined time period. I am just learning to write these scripts and have been searching for examples to try and learn from with no luck. i have a security camera system and all recordings go to directory by date and then a subdirectory by time and each recording is named by the camera name and time ex: Back room-01-060832-060858. i want a script that will move these files by name ex:"Back Room" from their original location to a folder named for the camera ex: "backlivingroom" i don't have a starting script to share as i can't find an example script to start with.
here is what i have started with
sudo command_to_run_as_root
#!/bin/sh
# Edit these variables
MYFILE="Back room"
GETFROM="/volume2/camera"
SAVEPATH="/volume2/camera/backlivingroom"
wget -q -O "$SAVEPATH" "$GETFROM/$MYFILE"
and the message i received
sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
sudo: a password is required
/volume2/camera/backroom.sh: line 7: $'\r': command not found
Thank You for any help Brian
Subreddit
Post Details
- Posted
- 10 months ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/synology/co...