Two scripts, delete and restore
Hello, just wondering if anyone on here can help me. I'm very very new to linux, and i am currently using VM Player to run an ISO which has a GUI and seems fairly simple. I am trying to create two scripts, one to delete a file (basicly move it some kind of recycling bin where it can be restored) And a restore script, to put that file back into its original directory. This seems fairly simple however i find myself scratching my head when it comes to scripting. Any help would be great, thanks!
|
Welcome to linuxquestions.
Quote:
Look at: man mv Quote:
Look at: man cp ---------------------------- Steve Stites |
thanks, how would i go about actually creating these scripts, so that in console i could type for example del <pathname> the file will end up in the dustbin in a retrievable state, and restore <filename> back to where it was? I'd like ideally for the restore script to add .back to a restored file if there is a file in there already with the same name
|
You create a script by creating a text file with a text editor and then make that file executable. The text file is a series of commands.
Here is a step by step tutorial on how to do that: http://linuxconfig.org/bash-scripting-tutorial ---------------------------- Steve Stites |
All times are GMT -5. The time now is 07:48 PM. |