肚脐眼流脓是会自己好:linux shell 点滴

来源:百度文库 编辑:中财网 时间:2024/05/03 05:12:02
linux ls -il 命令显示信息含义
[root@rhel15 ~]# ls -il
total 92
 327777 -rw------- 1 root root  1524 Mar 13 09:12 anaconda-ks.cfg
 164871 drwxr-xr-x 2 root root  4096 Mar 13 09:26 Desktop
1540098 -rw-r--r-- 1 root root 55848 Mar 13 09:12 install.log
1540099 -rw-r--r-- 1 root root  4836 Mar 13 09:12 install.log.syslogi节点号 文件类型 属主权限 组权限 其他权限 (硬)链接数 用户名 用户组  字节数  日期 时间 文件名。  硬链接数是ls的info帮助文档里”number of hard links”的直译。没有硬链接的普通文件的硬链接数为1,每增加一个硬链接,硬链接数加1;不包含子目录的目录文件的硬链接数为2(应该是.和..两个链接),每增加一个子目录,硬链接数加1(说明对于目录,其展示的是硬链接数和子目录数之和)

linux chmod命令参数及用法详解


Usage: chmod [OPTION]... MODE[,MODE]... FILE...  or:  chmod [OPTION]... OCTAL-MODE FILE...  or:  chmod [OPTION]... --reference=RFILE FILE...Change the mode of each FILE to MODE.
  -c, --changes           like verbose but report only when a change is made      --no-preserve-root  do not treat `/' specially (the default)      --preserve-root     fail to operate recursively on `/'  -f, --silent, --quiet   suppress most error messages  -v, --verbose           output a diagnostic for every file processed      --reference=RFILE   use RFILE's mode instead of MODE values  -R, --recursive         change files and directories recursively
  display this help and exit      --version  output version       --help   information and exit
Each MODE is of the form `[ugoa]*([-+=]([rwxXst]*|[ugo]))+'PS:
    OCTAL八进制的
r=4,w=2,x=1 若要rwx属性则4+2+1=7; 若要rw-属性则4+2=6; 若要r-x属性则4+1=7[root@localhost]# chmod g,+w ./ -Rchmod: invalid mode: `g,+w'Try `chmod --help' for more information.You have new mail in /var/spool/mail/root
[root@localhost]# chmod g,+,w ./ -Rchmod: invalid mode: `g,+,w'Try `chmod --help' for more information.
[root@localhost]# chmod ugoa+rx ./ -R   //ok
[root@localhost]# chown --helpUsage: chown [OPTION]... [OWNER][:[GROUP]] FILE...  or:  chown [OPTION]... --reference=RFILE FILE...Change the owner and/or group of each FILE to OWNER and/or GROUP.With --reference, change the owner and group of each FILE to those of RFILE.
  -c, --changes          like verbose but report only when a change is made....
Owner is unchanged if missing.  Group is unchanged if missing, but changedto login group if implied by a `:' following a symbolic OWNER.OWNER and GROUP may be numeric as well as symbolic.
Examples:  chown root /u        Change the owner of /u to "root".  chown root:staff /u  Likewise, but also change its group to "staff".  chown -hR root /u    Change the owner of /u and subfiles to "root".
把多种文件的全路径写到一个文件中find /home/ -name "*.c" -o -name "*.h" -o -name '*.adb' -o -name "*.ads"> /home/cscope.files