Posts tagged bash
Shell script for safely delete a file
Feb 26th
Posted by Nathan in Shell script | Please wait
The advantage of such a script is that the file can be recovered if the deletion was a mistake. The following bash shell script called “safdel.sh” using a turnkey menu to offer the following choices:
- The user enters the file name to be deleted.
- The name is checked to make sure the file exists and is an ordinary file. If not, the user is asked again for a file until a valid name is entered or the user exits. (more…)






