i want to make a script with a command to delete a folder and wanted to know would this do it
rm -rf "/foldername"
linux script help
- delboy13
- Thread is marked as Resolved.
-
-
Yes that command will do the trick, you might want to run some if statements too to check if the file/folder exists and if true then delete it.
rm -rf "/absolute/path/to/folder"
-
I have not tested this but will try to help.
Create a file named remove.sh and paste the line below inside it.
FTP this file to /var/script and give attributes 644.
Now setup a cron, Start the crontab editor from a terminal window with this command.
Add the line below to the config.
This should remove the folder in question every 10 minutes.
Let us know if it works.
-
I have not tested this but will try to help.
Create a file named remove.sh and paste the line below inside it.
FTP this file to /var/script and give attributes 644.
Now setup a cron, Start the crontab editor from a terminal window with this command.
Add the line below to the config.
This should remove the folder in question every 10 minutes.
Let us know if it works.
Make the file executable ( attributes 755 ) and it should be fine.
-
thanks Underworld & master G. will try tomorrow don't need this really as a cron as it will be an uninstall file on image. just playing about with an image at the moment. don't know nothing about coding but tying what i can. even edited a skin to how i wanted it took about a day but got there.
-
master G
Moved the thread from forum Linux to forum General Discussion.
Participate now!
Don’t have an account yet? Register yourself now and be a part of our community!