个人工具
登录
查看“UbuntuHelp:DeletingFiles”的源代码 - Ubuntu中文
UbuntuHelp
讨论
查看源代码
历史
搜索
导航
首页
最近更改
随机页面
页面分类
帮助
编辑
编辑指南
沙盒
新闻动态
字词处理
工具
链入页面
相关更改
特殊页面
页面信息
查看“UbuntuHelp:DeletingFiles”的源代码
来自Ubuntu中文
←
UbuntuHelp:DeletingFiles
跳转至:
导航
,
搜索
因为以下原因,你没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
{{From|https://help.ubuntu.com/community/DeletingFiles}} {{Languages|UbuntuHelp:DeletingFiles}} This page is a default template for documentation on the wiki. To create a new guide on the wiki, read the page [[UbuntuHelp:WikiGuide|WikiGuide]]. == Introduction == This page describes how to delete files through terminal. == Commands for deleting files == The terminal command for deleting file(s) is '''rm'''. The general format of this command is '''rm [-f|i|I|q|R|r|v] file...''' '''rm''' removes a file if you specify a correct path for it and if you don't, then it displays an error message and move on to the next file. Sometimes you may not have the write permissions for a file, in that case it asks you for confirmation. Type '''yes''' if you want to delete it. === Options === <ol><li>'''-f''' - deletes read-only files immediately without any confirmation.If both '''-f''' and '''-i''' are used then the one which appears last in the terminal is used by '''rm'''. </li><li>'''-i''' - prompts for confirmation before deleting every file beforing entering a sub-directory if used with '''-R''' or '''-r'''. If both '''-f''' and '''-i''' are used then the one which appears last in the terminal is used by '''rm'''. </li><li>'''-q''' - suppresses all the warning messages however error messages are still displayed. However the exit status is modified in case of any errors. </li><li>'''-R''' - means ''delete recursively'' and is used to delete the directory tree starting at the directory specified i.e. it deletes the specified directory along with its sub-directory and files. </li><li>'''-r''' - same as '''-R'''. </li><li>'''-v''' - displays the file names on the output as they are being processed. </li><li>'''-I''' - prompts everytime when an attempt is made to delete for than 3 files at a time or while removing recursively.</li></ol> == Precautions == <ol><li>'''Never''' type '''sudo rm -R /''' or '''sudo rm -r /''' as it deletes all the data in the root directory and will delete the data of all the mounted volumes until you want to wipe of everything from your system. </li><li>''' sudo rm -f /*''' also does blunders with your system.</li></ol> === Note === It is possible to recover files deleted through '''rm''' . If you want to permanently delete a file use '''shred'''. ---- [[category:CategoryCommandLine]] [[category:UbuntuHelp]]
该页面使用的模板:
模板:From
(
查看源代码
)
模板:Languages
(
查看源代码
)(受保护)
模板:Languages/Lang
(
查看源代码
)(受保护)
返回至
UbuntuHelp:DeletingFiles
。