1. Using the terminal dustbin directory/dev/null is equivalent to the dustbin of the Linux command line

To delete a file or folder, use the mv command to move the file or folder to/dev/null:

mv ceshi. txt /dev/null

  1. Permanently delete files or folders, installation packages, etc

rm -rf ceshi. Txt or rm - rf directory or rm - rf installation package name

  1. Uninstall the yum installation package

Yum remove installation package (uninstall)

  1. Delete empty directory

There is a special command rmdir for deleting empty directories. It can only be used to delete empty directories, thus protecting you from recursive deletion errors.

$ mkdir full

$ touch full/file.txt

$ rmdir full

rmdir: failed to remove 'full/': Directory not empty

$ mkdir empty

$ rmdir empty

Was this answer helpful? 0 Users Found This Useful (0 Votes)