![]() So the second time we run restore-trash, the utility presents a list of files deleted from the current directory, and asks you to specify the file you wish to restore. No files trashed from current dir (‘/home/linuxlala/Ġ 14:02:31 /home/linuxlala/Documents/forgm/memo of appearance.odtġ 14:02:34 /home/linuxlala/Documents/forgm/temp However, if you run it from another directory, it will only list the files in the /trash that were originally stored in that directory: $ cd ~/Music/ If you invoke it from your /home directory, it will list all the files in the /trash directory. The restore-trash command also keeps track of your current working directory. Restoring files from the trashcan using the restore-trash command. Unlike the rm command, which won’t delete non-empty directories unless you use the -R command option, trash-put has no such reservations about deleting them. You can provide a list of space-separated files, and even use pattern-matching to specify the files you wish to delete. To delete a file, you must use the trash-put command. restore-trash – Restore the specified file or directory.trash-empty – Delete all files and directories from trash.trash-rm – Delete individual files or directories from the trash. ![]() ![]() trash-list – Displays the contents of the trash.trash-put – Delete specified files or directories.Once installed, the trash-cli utility provides five unique commands that can be used to delete files or directories, view the contents of the trash, restore files and more: You can optionally use the -user command option with the last command so that the trash-cli utility isn’t installed system-wide and is only available for the specified user: $ sudo python setup.py install -user linuxlala You can now run the setup.py script to install the utility. The first command creates a directory named trash-cli in the working directory and copies the contents of the trash-cli repository. If it’s not available for your distribution, you can follow these steps to install it from Git: $ git clone If so, you can install it by typing: sudo apt-get install trash-cli -y You’ll find the utility in the software repositories of many popular desktop distributions. The trash-cli utility adds the ability to move files to the trash from the command line. (Image credit: Tom's Hardware) Deleting Files Safely with Trash-Cli
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |