Linux command
unix2mac 命令
文件
复制后可按需替换文件名、目录或参数。
常用示例
Convert
unix2mac [path/to/file]
Write
unix2mac -n [path/to/file] [path/to/new_file]
Display
unix2mac -i [path/to/file]
Convert and keep
unix2mac -k [path/to/file]
Force conversion
unix2mac -f [path/to/file]
说明
unix2mac converts text files from Unix line ending format (LF) to classic Mac format (CR). This format was used by Mac OS 9 and earlier. Modern macOS uses Unix-style LF line endings. The tool is primarily useful for compatibility with legacy Mac software or when working with files that specifically require CR line endings.
参数
- -n, --newfile _INFILE_ _OUTFILE_
- Write to new file instead of modifying in place.
- -o, --oldfile _FILE_
- In-place conversion (default mode).
- -i, --info _FLAGS_
- Display file information without converting.
- -k, --keepdate
- Keep output file date same as input.
- -f, --force
- Force conversion of binary files.
- -s, --safe
- Skip binary files (default).
- -b, --keep-bom
- Keep Byte Order Mark.
- -m, --add-bom
- Add UTF-8 Byte Order Mark.
- -r, --remove-bom
- Remove Byte Order Mark.
- -q, --quiet
- Quiet mode, suppress warnings.
- -v, --verbose
- Display detailed conversion information.
- -l, --newline
- Add additional newline.
- -F, --follow-symlink
- Convert symbolic link targets.
FAQ
What is the unix2mac command used for?
unix2mac converts text files from Unix line ending format (LF) to classic Mac format (CR). This format was used by Mac OS 9 and earlier. Modern macOS uses Unix-style LF line endings. The tool is primarily useful for compatibility with legacy Mac software or when working with files that specifically require CR line endings.
How do I run a basic unix2mac example?
Run `unix2mac [path/to/file]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -n, --newfile _INFILE_ _OUTFILE_ do in unix2mac?
Write to new file instead of modifying in place.