国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 系統 > Linux > 正文

Linux命令學習總結:rm命令

2024-06-28 13:25:09
字體:
來源:轉載
供稿:網友
linux命令學習總結:rm命令 2014-07-26 12:35 by 瀟湘隱者, ... 閱讀, ... 評論, 收藏, 編輯

命令簡介:

該命令用來刪除Linux系統中的文件或目錄。通常情況下rm不會刪除目錄,你必須通過指定參數-r或-R來刪除目錄。另外rm通常可以將該文件或目錄恢復(注意,rm刪除文件其實只是將指向數據塊的索引點(information nodes)釋放,只要不被覆蓋,數據其實還在硬盤上。如果想要保證文件的內容無法復原,可以使用命令shred 。 另外一般還是要慎用rm -rf *這樣的命令。

執行權限 :All User

指令所在路徑:/bin/rm

命令語法:

rm [OPTION]... FILE...

命令參數:

參數

長參數

描敘

-f

--force

強制刪除,忽略不存在的文件,從不給出提示。

-i

--interactive

交互模式刪除文件,刪除文件前給出提示。

-r

--recursive

遞歸的刪除目錄下面文件以及子目錄下文件。

-R

--recursive

遞歸的刪除目錄下面文件以及子目錄下文件。

-v

--verbose

顯示運行時詳細信息

--help

顯示命令在線幫助

--version

顯示命令版本信息

使用示例:

1:查看獲取rm命令的幫助信息。

[root@DB-Server kerry]# man rm
RM(1)                            User Commands                           RM(1)
NAME
       rm - remove files or directories
SYNOPSIS
       rm [OPTION]... FILE...
DESCRipTION
       This manual page documents the GNU version of rm.  rm removes each specified file.  By default, it does not remove directories.
       If  a  file is unwritable, the standard input is a tty, and the -f or --force option is not given, rm PRompts the user for whether to remove the file.  If
       the response is not affirmative, the file is skipped.
OPTIONS
       Remove (unlink) the FILE(s).
       -f, --force
              ignore nonexistent files, never prompt
       -i, --interactive
              prompt before any removal
       --no-preserve-root do not treat 鈥?鈥?specially (the default)
       --preserve-root
              fail to Operate recursively on 鈥?鈥?
       -r, -R, --recursive
              remove directories and their contents recursively
       -v, --verbose
              explain what is being done
       --help display this help and exit
       --version
              output version information and exit
       By default, rm does not remove directories.  Use the --recursive (-r or -R) option to remove each listed directory, too, along with all of its contents.
       To remove a file whose name starts with a 鈥?鈥? for example 鈥?foo鈥? use one of these commands:
              rm -- -foo
              rm ./-foo
       Note that if you use rm to remove a file, it is usually possible to recover the contents of that file.  If you want more assurance that the  contents  are
       truly unrecoverable, consider using shred.
AUTHOR
       Written by Paul Rubin, David MacKenzie, Richard Stallman, and Jim Meyering.
REPORTING BUGS
       Report bugs to <bug-coreutils@gnu.org>.
COPYRIGHT
       Copyright 漏 2006 Free Software Foundation, Inc.
       This is free software.  You may redistribute copies of it under the terms of the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.  There
       is NO WARRANTY, to the extent permitted by law.
SEE ALSO
       chattr(1), shred(1)
       The full documentation for rm is maintained as a Texinfo manual.  If the info and rm programs are properly installed at your site, the command

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 马关县| 达尔| 静乐县| 彭泽县| 会同县| 拉萨市| 商都县| 嘉黎县| 阳高县| 绩溪县| 深州市| 河池市| 通河县| 海丰县| 苗栗县| 织金县| 县级市| 如东县| 山东| 浑源县| 庆元县| 祥云县| 集贤县| 芜湖市| 德兴市| 亚东县| 马关县| 盐源县| 介休市| 肇州县| 鹿泉市| 永定县| 孝感市| 曲阜市| 汉沽区| 钦州市| 晋中市| 景东| 宜黄县| 穆棱市| 扬州市|