这篇文章将为大家详细讲解有关bash命令怎么在linux系统中使用,文章内容质量较高,因此小编分享给大家做个参考,希望大家阅读完这篇文章后对相关知识有一定的了解。
什么是linux系统
linux是一种免费使用和自由传播的类UNIX操作系统,是一个基于POSIX的多用户,多任务,支持多线程和多CPU的操作系统,使用linux能运行主要的UNIX工具软件,应用程序和网络协议。
<强> tab键补全用法强>
当我们敲击一下tab补全命令或文件名
当我们敲击两下标签列出相关的所有可选项
查看以下例子
[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 +。强>
用法举例
首先触摸一个文件,然后编辑这个文件
触摸abcdefghijk
敲入vi,然后Esc +。发现是不是abcdefghijk已经出现在vi后面\,,
<强>,转义字符用法强>
系统中一些命令都是别名的功能,比如我们使用的rm, mv等,实际上是rm -我和mv -我。
查看系统别名可以使用别名命令,例如以下系统默认的别名。
[root@localhost testdir] #别名
别名cp=& # 39; cp - # 39;
别名egrep=& # 39; egrep——颜色=汽车# 39;
别名fgrep=& # 39; fgrep——颜色=汽车# 39;
别名grep=& # 39; grep——颜色=汽车# 39;
别名l。=& # 39; ls - d。*——颜色=汽车# 39;
别名会=& # 39;ls - l——颜色=汽车# 39;
别名ls=& # 39; ls——颜色=汽车# 39;
别名mv=& # 39; mv - # 39;
别名rm=& # 39; rm - # 39;
别名=& # 39;别名|/usr/bin/which——tty-only read-alias——show-dot show-tilde& # 39;
有时候我们删一个文件时候,会出现以下提示,,需要我们一个个确认,原因就是rm默认就是rm -我起了作用。
[root@localhost testdir] # cd dir1
[root@localhost dir1] # ls
file1 file2 file3 file4
[root@localhost dir1] # rm file1 file2 file3 file4rm:定期删除空文件? .ile1 ?。y
rm:定期删除空文件.ile2 ?。y
rm:定期删除空文件.ile3 ?。y
rm:定期删除空文件.ile4 ?。y
我们可以使用转移字符使别名失效,使用如下,删除就不会再有提示确认了。
[root@localhost testdir] # cd dir1
[root@localhost dir1] # ls
file1 file2 file3 file4
# \ [root@localhost dir1] rm file1 file2 file3 file4