自己总结LINUX命令及记忆

alias 查看别名和设置别名
例子:
alias
显示:
alias cp='cp -i'
alias egrep='grep --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 mv='mv -i'
alias rm='echo "Command not found!"'
alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
设置别名:
alias rm='echo "Command not found!"'

lsattr 查看文件 系统属性
例子:
lsattr
显示:
-------------e- /bin/cat

chattr 设置文件系统属性(acdeijstuADST),常:
例子:
chattr +a /bin/cat
chattr -a /bin/cat
chattr +i /bin/cat
chattr -i /bin/cat

state [文件路径] 查看文件属性
例子:state /bin/cat
File: `/bin/cat'
Size: 48568 Blocks: 96 IO Block: 4096 regular file
Device: 803h/2051d Inode: 786462 Links: 1
Access: (4755/-rwsr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2019-01-02 22:07:55.121000310 +0800
Modify: 2017-03-23 02:52:45.000000000 +0800
Change: 2019-01-02 22:05:03.678999618 +0800

猜你喜欢

转载自blog.51cto.com/12776804/2338063