UNIX Publication - Debian: http://unix.pub/docs/debian/ - APT用法: http://unix.pub/docs/debian/apt_usage/ - dpkg用法: http://unix.pub/docs/debian/dpkg_usage/ - Debian发行版: http://unix.pub/docs/debian/DebianReleases/ - Debian基本命令备忘录: http://unix.pub/docs/debian/Debian-Basic-Command-Memo/ - Debian软件包: http://unix.pub/docs/debian/debian_packages/ - Distribution: http://unix.pub/docs/distributions/ - Waydog Linux: http://unix.pub/docs/distributions/Waydog/ - Lilidog Linux: http://unix.pub/docs/distributions/Lilidog/ - GNU核心工具: http://unix.pub/docs/coreutils/ - base32命令用法: http://unix.pub/docs/coreutils/base32_usage/ - base64命令用法: http://unix.pub/docs/coreutils/base64_usage/ - basenc命令用法: http://unix.pub/docs/coreutils/basenc_usage/ - cat命令用法: http://unix.pub/docs/coreutils/cat_usage/ - fmt命令用法: http://unix.pub/docs/coreutils/fmt_usage/ - fold命令用法: http://unix.pub/docs/coreutils/fold_usage/ - head命令用法: http://unix.pub/docs/coreutils/head_usage/ - nl命令用法: http://unix.pub/docs/coreutils/nl_usage/ - od命令用法: http://unix.pub/docs/coreutils/od_usage/ - pr命令用法: http://unix.pub/docs/coreutils/pr_usage/ - tac命令用法: http://unix.pub/docs/coreutils/tac_usage/ - Linux文档: http://unix.pub/docs/LinuxDoc/ - DAE用法: http://unix.pub/docs/LinuxDoc/dae_usage/ - Linux透明代理: http://unix.pub/docs/LinuxDoc/Linux_Transparent_proxy/ - OpenWrt: http://unix.pub/docs/openwrt/ - RaspberryPi: http://unix.pub/docs/raspberrypi/ - WDMyCloud vs Debian: http://unix.pub/docs/WDMyCloud/ - WD MyCloud Home安装运行Debian 11: http://unix.pub/docs/WDMyCloud/Running-Debian-11-on-WD-MyCloud-Home/ - WD MyCloud安装Debian Jessie: http://unix.pub/docs/WDMyCloud/Install-Debian-Jessie-on-WD-MyCloud-Gen1/ - WDMycloud救砖: http://unix.pub/docs/WDMyCloud/WDMycloud_Recovery/ - WDMycloud安装Debian: http://unix.pub/docs/WDMyCloud/WDMycloud_Crack_install_debian/ # head命令用法 `head`打印文件的第一部分(默认为10行);如果没有给出文件,或当给定为 - 的文件时,它会从标准输入读取。 ```sh $ head hugo.toml baseURL = 'https://nodeb.net/' title = 'NodeB' theme = 'nodeb' paginate = 5 # 语言配置 - 使用新方式避免弃用警告 defaultContentLanguage = 'zh-cn' [languages] [languages.zh-cn] ``` `-c [-]num` 打印num字节的内容,num为数字,如果前面加`-`则打印文件最后除了num字节的所有内容。 num可以加以下单位 ``` ‘b’ => 512 ("blocks") ‘KB’ => 1000 (KiloBytes) ‘K’ => 1024 (KibiBytes) ‘MB’ => 1000*1000 (MegaBytes) ‘M’ => 1024*1024 (MebiBytes) ‘GB’ => 1000*1000*1000 (GigaBytes) ‘G’ => 1024*1024*1024 (GibiBytes) ``` ```sh $ head -c 60 hugo.toml baseURL = 'https://nodeb.net/' title = 'NodeB' theme = 'no $ head -c -1k hugo.toml baseURL = 'https://nodeb.net/' title = 'NodeB' theme = 'nodeb' paginate = 5 # 语言配置 - 使用新方式避免弃用警告 defaultContentLanguage = 'zh-cn' [languages] [languages.zh-cn] label = "中文" locale = 'z ``` `-n [-]num` 输出num行内容,如果前面加了`-`则标识输出文件末尾num行以外的内容。 ```sh $ head -n 5 hugo.toml baseURL = 'https://nodeb.net/' title = 'NodeB' theme = 'nodeb' paginate = 5 $ head -n -50 hugo.toml baseURL = 'https://nodeb.net/' title = 'NodeB' theme = 'nodeb' paginate = 5 # 语言配置 - 使用新方式避免弃用警告 defaultContentLanguage = 'zh-cn' [languages] [languages.zh-cn] label = "中文" locale = 'zh-cn' # 替代 languageCode direction = 'ltr' # 从左到右 weight = 1 title = 'NodeB' ```