tab键补全用法
当我们敲击一下tab补全命令或文件名
当我们敲击两下tab 列出相关的所有可选项
cd - 相当于电视的回看
有时候我们进入一个非常长的目录,后来又进入另一个目录,可能我们还行回到原来那个长,如果事先知道,我们可能输入pwd ,以便一会儿粘贴,有时候忘了输入pwd我们可能无奈还得输入一次长长的路径,我们可以输入一下cd -试试,直接回到上次进入的目录,就像是看电视时候的回看按钮。是不是很好用?
查看以下例子
[root@localhost /]# cd /tmp
[root@localhost tmp]# pwd
/tmp
[root@localhost tmp]# cd /
[root@localhost /]# pwd
/
[root@localhost /]# cd -
/tmp
[root@localhost tmp]# pwd
/tmp
Esc+.
用法举例
首先touch一个文件,然后编辑这个文件
touch abcdefghijk
敲入vi ,然后Esc+. 发现是不是abcdefghijk已经出现在vi后面\
转义字符用法
系统中一些命令都是别名的功能,比如我们使用的rm、mv等,实际上是 rm -i和mv -i 。
查看系统别名可以使用alias命令,例如以下系统默认的别名。
[root@localhost testdir]# 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 | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
有时候我们删一个文件时候,会出现以下提示, 需要我们一个个确认,原因就是rm默认就是rm -i起了作用。
[root@localhost testdir]# cd dir1
[root@localhost dir1]# ls
file1 file2 file3 file4
[root@localhost dir1]# rm file1 file2 file3 file4rm: remove regular empty file ?.ile1?. y
rm: remove regular empty file ?.ile2?. y
rm: remove regular empty file ?.ile3?. y
rm: remove regular empty file ?.ile4?. y
我们可以使用转移字符使别名失效,使用如下,删除就不会再有提示确认了。
[root@localhost testdir]# cd dir1
[root@localhost dir1]# ls
file1 file2 file3 file4
[root@localhost dir1]# \rm file1 file2 file3 file4
lixux,bash,命令
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
更新日志
- TheLatinSoundofLexVandyke-ConciertodeAranjuez拉丁情人2012[SACD-ISO]
- 《怪物猎人世界》史低¥44,《耻辱终极版》仅需¥12
- 杉果秋促最后一天!海量3A大作击穿Steam史低
- 【果娘聊天室】国庆假期就这么水灵灵地结束啦!
- 《死或生》恋爱游戏新角色:来自大雷温柔公主的喂食
- 《寂静岭2》原制作人盛赞《寂静岭2:重制版》:新玩家能玩 我超高兴
- 艾什莉体模家今日份的COS:《鸣潮》守岸人 雪白香肩清纯而诱惑
- 微信积分商城进入方法,微信积分商城介绍
- 希诺宁进不进常驻说明,希诺宁角色分析
- 【原神】V5.0攻略 | 大型开图世界任务整合
- 群星.1990-细听锋芒(2014华星40金碟复刻版)【华星】【WAV+CUE】
- 郭婷筠.2024-爱你到底为啥物【福茂】【FLAC分轨】
- 王芷蕾.2010-仰望【丰华】【WAV+CUE】
- Ben Hum《Ben Hum (Acoustic Version)》[320K/MP3][108.48MB]
- Ben Hum《Ben Hum (Acoustic Version)》[FLAC/分轨][310.19MB]