架构师_程序员_码农网

Retrieve password
Register

QQ登录

Just one step to get started

Search
Views:7608|Replies: 0
打印 上一主题 下一主题

[linux]Linux Delete Folder and File Commands

[copy link]
跳转到指定楼层
the owner of the building
发表于 2014-10-19 22:52:10| 看该作者回帖奖励|ReverseBrowse|Read Mode
linux delete directory is very simple, many people are still accustomed to use rmdir, but once the directory is non-empty, it is in deep distress, now use rm -rf command can be.
Directly rm can be, but to add two parameters -rf that is: rm -rf directory name
-r is the downward recursion, no matter how many levels of directories, and delete them all together
-f means to forcibly delete the directory without any prompts.

Example of deleting a folder:
rm -rf /var/log/httpd/access
will delete the /var/log/httpd/access directory and all files and folders under it.



Delete file usage examples:
rm -f /var/log/httpd/access.log
will force the file /var/log/httpd/access.log to be deleted.


Be very careful when using rm -rf, linux doesn't have a recycle bin.

Many people do not see this important message before using it, so it is very difficult to retrieve it after deleting it.









Previous: Seaside quite good
Next article: CSS style a total of 3 in the use of the method of introduction
The code farmer network, only published in the process of practice, encountered technical difficulties, do not mislead others.
You need to log in before you can post back Log in | Register

This version of the integral rules

DISCLAIMER:
All software, programming materials or articles released by the code farmer network are only used for learning and research purposes; the above content shall not be used for commercial or illegal purposes, otherwise, all the consequences please be the user's own responsibility. This site information from the network, copyright dispute has nothing to do with this site. You must completely remove the above content from your computer within 24 hours of downloading. If you like the program, please support the genuine software, buy registration and get better genuine service. If there is any infringement, please contact us by email to deal with it.

Mail To:help@itsvse.com

QQ| ( ICP备14021824号-2 )|Sitemap

GMT+8, 2024-9-17 13:23

Quick ReplyBack to topBack to list