We all know how to delete system files under Linux, but sometimes it is not complete, how to completely delete files? The following small series will introduce you to the method of completely deleting Linux files, let's learn together.
linux delete directory is simple, many people still used rmdir, but once the directory is not empty, it plunged into deep distress, now use rm -rf command.
Direct rm is fine, but add two parameters -rf ie: rm -rf directory name
delete directory, file rm(remove)
Description: Delete files or directories.
Syntax: rm [-dfirv][--help][--version][file or directory. . .]
Additional note: Execute the rm command to delete the file or directory. If you want to delete the directory, you must add the parameter ”-r”, otherwise the default will only delete the file.
Parameters:
-d or –directory Delete the hard-wired data of the directory to be deleted directly into 0, and delete the directory.
-f or –force Forces the deletion of files or directories.
-i or –interactive Ask the user before deleting the existing file or directory.
-r or -R or –recursive Recursive processing, all files and subdirectories under the specified directory are processed together.
-v or –verbose Shows the execution of the instruction.
1 Deleting a folder
de "rm -rf fileNamede"
- Deleting a folder instance:
rm -rf /var/log/httpd /access
will delete the /var/log/httpd/access directory and all files and folders under it
Need to be reminded: be careful when using this rm -rf , linux does not have a recycle bin
2 delete files
de "rm -f fileNamede"
When using rm -rf must be very careful, linux does not have a recycle bin
Deleting files other than the specified file
Prev12Next page Total 2 pages
Sometimes we want to log in to SSH through another account, usually we need to re-enter the password
Among the many commands of Linux system, rm command is mainly used to delete files. The following sm
Many people may not know that the Ubuntu system has its own recovery mode. So what
In many cases, Linux is used as a server to allow computers on the Internet to acce
What should I do if the Linux runlevel is set to 6 and then restart infinitely?
How to handle Too many open files under Linux?
Linux how to use vim for advanced editing
Linux system disable ping command skills
Linux how to install and configure rz/sz command
In the Linux system, the head command instance is explained in detail.
How to boot Linux ISO image file from hard disk
Ubuntu dual system does not have a bootable device solution
How does Ubuntu recover the GNOME Panel that was accidentally deleted?
How to use Windows 7 Group Policy to close search records
Win7/Win8 traditional BIOS graphic installation SteamOS diagram detailed tutorial
What should I do if win10 installs a software and causes a blue screen error to enter safe mode?
Microsoft: Windows 7 is more secure than XP SP3
Tips for saving the default IE homepage to favorites
How to install the Nantian PR2E dot matrix printer driver for the 64-bit win8?
What should I do if the xp taskbar becomes a double layer?
How to add an application icon on the Win10 desktop to display our commonly used icon