linux中tab键的功能
在linux的bash中,tab键可被用来补全命令或者文件名。
假设你要用到一个你只记住前面几个字母的命令,那么tab键就派上用场了,比如:
[[email protected] ~]# ipt
这时候你突然忘了后面是什么了,没关系,只需按一下tab键:
[[email protected] ~]# ipt iptables iptables-restore iptables-save iptables-xml iptunnel
此时,若只有一个选项,命令就会自动补全,若有多个选项,系统就会给你列出所有选项。
另外,tab的另外一个功能就是补全文件名或者文件路径,用法和上面一样:
[[email protected] ~]# cd ap
按下tab:
[[email protected] ~]# cd apache-tomcat-9.0.6/
自动给你补全了。