Delete/Restore Script


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Delete/Restore Script
# 1  
Old 11-21-2016
Delete/Restore Script

Hi there is anyone able to show me two scripts for a delete and a restore command.

Delete - move a file to a dustibin directory that i have created. check to see if that file exsits first in the dustbin if so delete the file before moving the new one.

Restore - return the file to its original location, if the directory that it came from is deleted it restores the directory and all of the sub-directories.

Must be able to handle wildcards, absolute and relative paths.
# 2  
Old 11-21-2016
Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so.

More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.

The UNIX and Linux Forums.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Help Writing File Restore Script

Hi all, I have been tasked with creating a script that sends a file into a created "recycling" directory and another script that restores a "deleted" file. I have already created the removal script but am stuck on the restoring part. I need to restore the file to its original location by... (0 Replies)
Discussion started by: bashbeginner
0 Replies

2. Shell Programming and Scripting

Script needed to delete to the list of files in a directory based on last created & delete them

Hi My directory structure is as below. dir1, dir2, dir3 I have the list of files to be deleted in the below path as below. /staging/retain_for_2years/Cleanup/log $ ls -lrt total 0 drwxr-xr-x 2 nobody nobody 256 Mar 01 16:15 01-MAR-2015_SPDBS2 drwxr-xr-x 2 root ... (2 Replies)
Discussion started by: prasadn
2 Replies

3. Shell Programming and Scripting

RecycleBin Script Restore

Hi there I am making a recycle bin script in linux that consists of three scripts delete, trash and restore. The problem is with my restore script, it is using a Paths text file to store file locations when it is deleted, so that if the user restores a file out of the trash bin (recyclebin) the... (8 Replies)
Discussion started by: zinn
8 Replies

4. Shell Programming and Scripting

RecycleBin Script Restore

this is complete.. (2 Replies)
Discussion started by: zinn
2 Replies

5. UNIX for Dummies Questions & Answers

Recreate/Restore Repository and/or change/delete Public Keys???

I have a BIG problem... I host a public (Debian) repository on Cydia (for jailbroken iphones). I use my home Mac running Ubuntu in VMWare Fusion. For the repository, I have to have 5 items in a folder to make it 'live:' 1. deb_files folder (to hold my Debian packages) 2. Packages file 3.... (0 Replies)
Discussion started by: thazsar
0 Replies

6. Homework & Coursework Questions

Bash Script Restore help

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: Attempting to make a auto restore script i have one made for backing up cron and installed programs just need to... (1 Reply)
Discussion started by: paperghost
1 Replies

7. Shell Programming and Scripting

scripts to Initialise,backup,restore,delete and empty

you are to write scripts for a customer that would require a system enable the backing up of files and directories. The script should (these names should be used): 1. INITIALISE: Initialise the directory for the backup(called backup and should be in the home directory) and any other... (1 Reply)
Discussion started by: babby01
1 Replies

8. Homework & Coursework Questions

Delete restore and empty trash

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: A set of Linux shell scripts is required to allow users to ‘remove' files without them really disappearing... (1 Reply)
Discussion started by: mr100perecent
1 Replies

9. AIX

mksysb restore - Wrong OS level for restore

Hi all, I am still working on my mksysb restore. My latest issue is during an alt_disk_install from tape I got the following error after all the data had been restored. 0505-143 alt_disk_install: Unable to match mksysb level 5.2.0 with any available boot images. Please correct this... (0 Replies)
Discussion started by: pobman
0 Replies

10. Shell Programming and Scripting

Restore Script

Hope I have posted this in the correct forum. I'm trying to recover some Oracle files from tape to setup an offsite recovery system. These files are nightly backdumps tar to tape. I have recovered rootvg and vg01 from the weekends full backup, now to restore these nightly files I discovered I... (1 Reply)
Discussion started by: Chrisp
1 Replies
Login or Register to Ask a Question