ubuntu dos转linux命令行,Ubuntu下dos2unix:找不到命令的解决方案

[root@/opt]#dos2unix

dos2unix:找不到命令

[root@/opt]#

Ubuntu下采用了另外的命令

todos

fromdos

[root@/opt]#fromdos

程序“fromdos”尚未安装。  您可以使用以下命令安装:

apt-get install tofrodos

[root@/opt]#apt-get install tofrodos

正在读取软件包列表... 完成

正在分析软件包的依赖关系树

正在读取状态信息... 完成

下列【新】软件包将被安装:

tofrodos

升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 456 个软件包未被升级。

需要下载 20.4kB 的软件包。

解压缩后会消耗掉 86.0kB 的额外空间。

获取:1 http://cn.archive.ubuntu.com/ubuntu/ lucid/main tofrodos 1.7.8.debian.1-2 [20.4kB]

下载 20.4kB,耗时 0秒 (30.2kB/s)

选中了曾被取消选择的软件包 tofrodos。

(正在读取数据库 ... 系统当前总共安装有 129177 个文件和目录。)

正在解压缩 tofrodos (从 .../tofrodos_1.7.8.debian.1-2_i386.deb) ...

正在处理用于 man-db 的触发器...

正在设置 tofrodos (1.7.8.debian.1-2) ...

[root@/opt]#fromdos -h

tofrodos Ver 1.7.8 Converts text files between DOS and Unix formats.

Copyright 1996-2008 by Christopher Heng. All rights reserved.

Usage: fromdos [options] [file...]

-a  Always convert (DOS to Unix: kill all CRs;

Unix to DOS: convert all LFs to CRLFs)

-b  Make backup of original file (.bak).

-d  Convert DOS to Unix.

-e  Abort processing files on error in any file.

-f  Force: convert even if file is not writeable.

-h  Display help on usage and quit.

-l file Log most errors and verbose messages to

-o  Overwrite original file (no backup).

-p  Preserve file owner and time.

-u  Convert Unix to DOS.

-v  Verbose.

-V  Show version and quit.

[root@/opt]#formdos a.c

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值