linux 系统 目录,以部分及相关命令

linux 系统里的文件类型有: b、 d、l、 c、 -  、s (块设备、目录、软连接、数字串设备、普通文件(文本、二进行文件)、socket文件 )

ls 命令

ls -a  查看当前目录下的所有文件 

ls -l = ll  查看当前目录下所有文件的详细信息

ls -i  查看相关文件 的INODE 号

ls -t  查看相关文件的创建时间(以顺序排列)

ls -h 查看相关文件的大小(人性化一点)

ls -d  /dir_name 只列出目录,而不包含子文件。

(上面选项之间可以相互组合),常用: ll -th ll -ath

alias 别名命令:

[root@os7 ~]# which ls
alias ls='ls --color=auto'
/usr/bin/ls

即:  alias new command = "old command + 选项或参数"

[root@OS_74 /]# alias
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
alias l.='ls -d .* --color=auto'
alias ll='ls -l --color=auto'
alias ls='ls --color=auto'
alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'

查看定义了的alias别名: 直接 输入  alias

原文地址:https://www.cnblogs.com/nfyx/p/8629453.html