- 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
- Permanently delete files or folders, installation packages, etc
rm -rf ceshi. Txt or rm - rf directory or rm - rf installation package name
- Uninstall the yum installation package
Yum remove installation package (uninstall)
- 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