linux查看和创建文件命令


linux查看和创建文件命令
 
Linux代码  
cat /test/first.txt  
 查看文件 
 
Linux代码  
cat > second.txt  
Hello   
everyone!  
 >:表示导向
 
输入最后一行内容后,要将Enter键转行,否则最后一行不能显示
 
Linux代码  
cat -b /test/first.txt  
 为每一非空行加编号
 
Linux代码  
cat first.txt second.txt third.txt  
 同时显示多个文件内容 
 
Linux代码  
cat first.txt second.txt third.txt > new.txt  
 将多个文件合并到一个文件
 
Linux代码  
more +3 new.txt  
 "+行数":从该行起开始显示
 
Linux代码  
more +/do new.txt  
"+/字符串":从第一次出现该字符串开始显示
 
Linux代码  
less new.txt  
 按H出现在线使用说明,按Q离开
 

相关内容

    暂无相关文章