[root@localhost ~]# alias
alias cp='cp -i'
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 mv='mv -i'
alias rm='rm -i'
alias which='(alias; declare -f) | /usr/bin/which --tty-only --read-alias --read-functions --show-tilde --show-dot'
alias xzegrep='xzegrep --color=auto'
alias xzfgrep='xzfgrep --color=auto'
alias xzgrep='xzgrep --color=auto'
alias zegrep='zegrep --color=auto'
alias zfgrep='zfgrep --color=auto'
alias zgrep='zgrep --color=auto'
cd:change directory(改变目录)
切换目录
[root@localhost etc]# cd -
/root
[root@localhost ~]# cd -
/etc
[root@localhost etc]#
快速返回到家目录
[root@localhost etc]# cd ~
[root@localhost ~]#
pwd:print work directory(显示当前路径)
[root@localhost ~]# pwd
/root
mkdir: make directory(制造目录)
创建目录
[root@localhost ~]# mkdir tjh/a
创建多级目录
[root@localhost ~]# mkdir -p tjh/a/b/c/d
touch 创建(空文件)/覆盖状态
[root@localhost ~]# touch aaa.txt
[root@localhost ~]# ls
a aaa.txt abc anaconda-ks.cfg tjh
[root@localhost ~]# ls
a aaa.txt abc anaconda-ks.cfg tjh
[root@localhost ~]# rm abc
rm: remove regular empty file 'abc'? y
[root@localhost ~]# ls
a aaa.txt anaconda-ks.cfg tjh
强制删除(不经过询问就直接删除)
[root@localhost ~]# rm -rf aaa.txt
[root@localhost ~]# ls
a anaconda-ks.cfg tjh
cp:copy(复制)
复制文件
[root@localhost ~]# cp abc.txt abb.txt
[root@localhost ~]# ls
a abb.txt abc.txt anaconda-ks.cfg tjh
加-r 复制目录文件
[root@localhost ~]# cp -r a b
[root@localhost ~]# ls
a abb.txt abc.txt anaconda-ks.cfg b tjh
mv:move(移动)
在本地移动时为重命名
[root@localhost ~]# ls
a abb.txt abc.txt anaconda-ks.cfg b tjh
[root@localhost ~]# mv a c
[root@localhost ~]# ls
abb.txt abc.txt anaconda-ks.cfg b c tjh
目标为其他目录时为剪切移动
[root@localhost ~]# ls
abb.txt abc.txt anaconda-ks.cfg b c tjh
[root@localhost ~]# mv b tjh
[root@localhost ~]# ls
abb.txt abc.txt anaconda-ks.cfg c tjh
[root@localhost ~]# ls tjh/
a b
基本指令操作ls:list(列表)检查文件或目录是否存在[root@localhost ~]# ls /etc/hosts检查目录是否存在[root@localhost ~]# ls /etc/有针对的查看目录信息[root@localhost ~]# ls -d/acd:change directory(改变目录)对于当前路径找下面的路径信息[root@localhost ~]# cd a/切换目录 [root@oldboyedu oldboy05]# cd /tmp/