文件操作CLI Manual
$cat
连接文件并在终端标准输出上打印文件内容。
命令语法POSIX Standard
cat [OPTIONS] [FILE...]在交互式终端沙盒中实时运行
无需安装的客户端实时仿真环境。
bash — terminal
AST Sandbox (Free)
概述与工作原理
cat 用于快速查看或合并文本文件内容,常与重定向和管道结合使用。
常用参数与选项说明
| Flag / Option | Description |
|---|---|
| -n | Number all output lines starting from 1. |
| -b | Number only non-blank output lines. |
| -s | Squeeze multiple consecutive blank lines into a single blank line. |
| -E | Display a dollar sign ($) at the end of each line. |
实际生产案例与代码范例
相关 Linux 常用命令
$find文件操作
根据文件名、类型、大小或修改时间在目录层级中高效搜索文件与目录。
$mkdir文件操作
Create new directories and folder hierarchies.
$rm文件操作
Remove files or directories from the filesystem.
$cp文件操作
Copy files and directories to a destination path.
$mv文件操作
Move or rename files and directories.
$touch文件操作
Create empty files or update file access and modification timestamps.