1.file命令 查看文件属性

$file new_dir

linux常用命令四

2.查看文件内容

1)cat

$cat test_file

$cat -n test_file -n参数会给所有的行加上行号。

$cat -b test_file -b参数给有文本的行加上行号。

$cat -T test_file   让制表符出现,可以用-T参

2)more

$more /etc/bash.bashrc

linux常用命令四

3)less

$less /etc/bash.bashrc

4)tail 默认显示最后十行数据

$tail myfile

$tail -n 5 myfile 显示最后五行

5)head命令 默认显示前十行

$head myfile

$head -n 6 myfile显示前6行






相关文章:

  • 2021-08-24
  • 2021-07-01
  • 2021-04-11
  • 2021-12-21
  • 2022-12-23
  • 2022-12-23
  • 2022-02-08
  • 2022-12-23
猜你喜欢
  • 2021-11-24
  • 2021-06-17
  • 2021-06-20
  • 2021-10-26
  • 2022-12-23
相关资源
相似解决方案