Linux command
mac2unix 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Example
mac2unix [path/to/file]
Example
mac2unix -n [path/to/file] [path/to/new_file]
Example
mac2unix -i [path/to/file]
Example
mac2unix --keep-bom [path/to/file]
说明
mac2unix converts macOS-style line endings (CR) to Unix-style line endings (LF). It is part of the dos2unix package and handles text file format conversions.
参数
- -n, --newfile SRC DST
- Write output to new file
- -i, --info
- Display file information
- --keep-bom
- Keep Byte Order Mark
- --add-bom
- Add Byte Order Mark
- --remove-bom
- Remove Byte Order Mark
- -k, --keepdate
- Keep original file date
- -q, --quiet
- Quiet mode
FAQ
What is the mac2unix command used for?
mac2unix converts macOS-style line endings (CR) to Unix-style line endings (LF). It is part of the dos2unix package and handles text file format conversions.
How do I run a basic mac2unix example?
Run `mac2unix [path/to/file]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -n, --newfile SRC DST do in mac2unix?
Write output to new file