linux命令行如何上翻,Linux学习教程-获取可用命令行参数 or 文件上下翻转和左右翻转...
導讀
前面使用的,有幾個用到了參數如ls -l, head -n 6等,需要注意的是跟參數之間要有空格。
獲取可用命令行參數
終端運行man ls可以查看ls所有可用的參數,上下箭頭翻頁,按q退出查看。(man: manual, 手冊)
ct@ehbio:~/data$ man ls
NAME
ls - list directory contents
SYNOPSIS
ls [OPTION]... [FILE]...
DESCRIPTION
List information about the FILEs (the current directory by default).
Sort entries alphabetically if none of -cftuvSUX nor --sort is specified.
Mandatory arguments to long options are mandatory for short options too.
-a, --all
do not ignore entries starting with .
-A, --almost-all
do not list implied . and ..
--author
with -l, print the author of each file
-b, --escape
print C-style escapes for nongraphic characters
....
文件上下翻轉和左右翻轉
兩個有意思的命令,tac: 文件翻轉,第一行變為最后一行,第二行變為倒數第二行;rev每列反轉,第一個字符變為最后一個字符,第二個字符變為倒數第二個字符。
ct@ehbio:~/data$ cat < first
> second
> third
> END
third
second
first
ct@ehbio:~/data$ cat < abcde
> xyz
> END
edcba
zyx
本文來自《Linux就該這么學》官方資訊站。
總結
以上是生活随笔為你收集整理的linux命令行如何上翻,Linux学习教程-获取可用命令行参数 or 文件上下翻转和左右翻转...的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: python数据结构中文版_Python
- 下一篇: java 检索编号输出信息_java,_