`

每天一个linux命令系列 - head

 
阅读更多

Head

Usage: head [OPTION]... [FILE]...
Print the first 10 lines of each FILE to standard output.
With more than one FILE, precede each with a header giving the file name.
With no FILE, or when FILE is -, read standard input.

Mandatory arguments to long options are mandatory for short options too.
  -c, --bytes=[-]K         print the first K bytes of each file;
                             with the leading `-', print all but the last
                             K bytes of each file
  -n, --lines=[-]K         print the first K lines instead of the first 10;
                             with the leading `-', print all but the last
                             K lines of each file
  -q, --quiet, --silent    never print headers giving file names
  -v, --verbose            always print headers giving file names
      --help     display this help and exit
      --version  output version information and exit

K may have a multiplier suffix:
b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024,
GB 1000*1000*1000, G 1024*1024*1024, and so on for T, P, E, Z, Y.

Report head bugs to bug-coreutils@gnu.org
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
For complete documentation, run: info coreutils 'head invocation'

分享到:
评论

相关推荐

    主要是在学习Linux常用命令的时候的一些总结与心得_Linux-study-notes.zip

    Linux是一种广泛使用的自由和开放源代码的类Unix操作系统,以其强大的命令行...Linux命令的学习和实践是一个持续的过程,需要不断地复习和应用。通过日积月累的努力,可以逐渐提高在Linux环境下进行高效工作的能力。

    linux学习资料

    Linux是一种广泛使用的开源操作系统,其学习资源和资料非常多,适合初学者逐步深入学习。...这份学习资料按每天学习一个命令的方式,为初学者提供了一个系统学习Linux命令的途径,帮助用户逐步精通Linux操作。

    linux技术支持面试题.pdf

    2. **网卡配置文件路径**:在大多数Linux发行版中,网络接口的配置文件通常位于`/etc/sysconfig/network-scripts/`目录下,文件名为`ifcfg-eth0`(eth0代表第一个以太网接口)。 3. **远程连接工具**:常用的远程...

    ElasticSearch入门篇.docx

    - **Cluster(集群)**: 一个或多个ElasticSearch节点的集合,共同维护数据和提供联合索引/搜索功能。 - **Node(节点)**: 单个ElasticSearch实例,可以是独立的或集群的一部分。 - **Shards & Replicas(分片与...

    Shell脚本自动备份与删除apache日志

    以下是一个简单的Shell脚本示例,用于备份和清理Apache日志: ```bash #!/bin/bash # 定义变量 LOG_FILE="/var/log/apache2/access.log" # Apache日志文件路径 BACKUP_DIR="/backup/logs" # 备份目录 MAX_BACKUPS=...

    MySQL定时备份方案(利用Linux crontab)

    接下来,我们创建一个shell脚本来自动化这个过程。以下是一个简单的示例: ```bash # 定义变量 username=root password=nicai database_name=l_love_you backup_path=/app/mysql_backup count=30 # 获取当前日期和...

    PHP基础教程 是一个比较有价值的PHP新手教程!

    通过我们已经学过的知识,你可以编写一个最简单的程序输出一个也许是程序世界中最有名的词语: &lt;HEAD&gt; echo "Hello World!"; ?&gt; &lt;/HEAD&gt; First PHP page // Single line C++ style comment /* printing the...

Global site tag (gtag.js) - Google Analytics