ubunto10.04的tofrodos不含dos2unix和unix2dos命令了

Ubuntu 10.04的tofrodos包已将命令更改为todos和fromdos,但某些场景仍需使用dos2unix和unix2dos。解决方法是通过安装busybox并创建符号链接,busybox 1.15.2包含了这两个命令。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

$ dpkg -L tofrodos
/.
/usr
/usr/bin
/usr/bin/fromdos
/usr/share
/usr/share/man
/usr/share/man/man1
/usr/share/man/man1/fromdos.1.gz
/usr/share/doc
/usr/share/doc/tofrodos
/usr/share/doc/tofrodos/NEWS.Debian.gz
/usr/share/doc/tofrodos/tofrodos.html
/usr/share/doc/tofrodos/copyright
/usr/share/doc/tofrodos/changelog.Debian.gz
/usr/share/doc/tofrodos/readme.txt.gz
/usr/bin/todos
/usr/share/man/man1/todos.1.gz

 

可以看出,改成todos和fromdos了,但是有些地方不得不用老的命令dos2unix和unix2dos,怎么办呢?

解决方案之一是下一个busybox编译,然后自己建个符号连接。

 

我用的是busybox1.15.2,里面包含的了这两个命令:

 

$ ./busybox
BusyBox v1.15.2 (2010-03-22 11:29:01 CST) multi-call binary
Copyright (C) 1998-2008 Erik Andersen, Rob Landley, Denys Vlasenko
and others. Licensed under GPLv2.
See source distribution for full notice.

Usage: busybox [function] [arguments]...
   or: function [arguments]...

    BusyBox is a multi-call binary that combines many common Unix
    utilities into a single executable.  Most people will create a
    link to busybox for each function they wish to use and BusyBox
    will act like whatever it was invoked as!

Currently defined functions:
    [, [[, addgroup, adduser, adjtimex, ar, arp, arping, ash, awk, basename, beep, blkid,

    brctl, bunzip2, bzcat, bzip2, cal, cat, catv, chat, chattr, chgrp, chmod, chown, chpasswd,

    chpst, chroot, chrt, chvt, cksum, clear, cmp, comm, cp, cpio, crond, crontab, cryptpw,

    cttyhack, cut, date, dc, dd,  deallocvt, delgroup, deluser, depmod, devmem, df, dhcprelay,

    diff, dirname, dmesg, dnsd, dnsdomainname, dos2unix, du, dumpkmap, dumpleases, echo,

    ed, egrep, eject, env, envdir, envuidgid, ether-wake, expand, expr, fakeidentd, false, fbset,

    fbsplash, fdflush, fdformat, fdisk, fgrep, find, findfs,  fold, free, freeramdisk, fsck, fsck.minix,

    fsync, ftpd, ftpget, ftpput, fuser, getopt, getty, grep, gunzip, gzip, halt, hd, hdparm, head,

    hexdump, hostid, hostname, httpd, hush, hwclock, id, ifconfig, ifdown, ifenslave, ifplugd,

    ifup, inetd, init, insmod, install, ionice, ip, ipaddr, ipcalc, ipcrm, ipcs, iplink, iproute, iprule,

    iptunnel, kbd_mode, kill, killall, killall5, klogd, last, length, less, linux32, linux64, linuxrc, ln,
    loadfont, loadkmap, logger, login, logname, logread, losetup, lpd, lpq, lpr, ls, lsattr, lsmod,

    lzmacat, lzop, lzopcat, makedevs, makemime, man, md5sum, mdev, mesg, microcom,

    mkdir, mkdosfs, mkfifo, mkfs.minix, mkfs.vfat, mknod, mkpasswd, mkswap, mktemp,

    modprobe, more, mount, mountpoint, msh, mt, mv, nameif, nc, netstat, nice, nmeter,

    nohup, nslookup, od, openvt, passwd, patch, pgrep, pidof, ping, ping6, pipe_progress,

    pivot_root, pkill, popmaildir, poweroff, printenv, printf, ps, pscan, pwd, raidautorun, rdate,

    rdev, readahead, readlink, readprofile, realpath, reboot, reformime, renice, reset, resize, rm,

    rmdir, rmmod, route, rtcwake, run-parts, runlevel, runsv, runsvdir, rx, script, scriptreplay,

    sed, sendmail, seq, setarch, setconsole, setfont, setkeycodes, setlogcons, setsid, setuidgid,

    sh, sha1sum, sha256sum, sha512sum, showkey, slattach, sleep, softlimit, sort, split,
    start-stop-daemon, stat, strings, stty, su, sulogin, sum, sv, svlogd, swapoff, swapon,

    switch_root, sync, sysctl, syslogd, tac, tail, tar, tcpsvd, tee, telnet, telnetd, test, tftp, tftpd,

    time, timeout, top, touch, tr, traceroute, true, tty, ttysize, tunctl, udhcpc, udhcpd, udpsvd,

    umount, uname, uncompress, unexpand, uniq, unix2dos, unlzma, unlzop, unzip, uptime,

    usleep, uudecode, uuencode, vconfig, vi, vlock, volname, watch, watchdog, wc, wget, which,

    who, whoami, xargs, yes, zcat, zcip

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值