#16 Working with the Removed File Archive
Now that a directory of deleted files and directories is hidden within the user's account home, a script to let the user pick and choose between these deleted files would clearly be useful. However, it's quite a task to address all the possible situations, ranging from no matches to one match to more than one match. In the case of more than one match, for example, do you automatically pick the newest file to undelete? Indicate how many matches there are and quit? Present data on the different versions and let the user pick? Let's see what we can do. . . .
The Code
#!/bin/sh # unrm - Searches the deleted files archive for the specified file or directory. # If there is more than one matching result, ...
Get Wicked Cool Shell Scripts now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.