[nylug-talk] I swore I'd never do anything like this!

Andrew Biggadike ajb320 at nyu.edu
Tue May 13 23:05:00 EDT 2003


On Tue, 2003-05-13 at 21:24, Tony Marchesano wrote:
> rm /bin/*
> 
> oh F****  where did that leading  /  come from !!!????
> 
> now what?
> 

In hopes that this may help, here's the ls -l of my Debian
testing/unstable (mix) box's /bin.  Surely only some of these are
essential. 

$ cat /etc/debian_version
testing/unstable
$ ls -l /bin
total 2868
-rwxr-xr-x    1 root     root        23888 May  9  2002 ae
-rwxr-xr-x    1 root     root         2492 Mar 21 18:16 arch
-rwxr-xr-x    1 root     root       581100 Feb 28 01:53 bash
-rwxr-xr-x    1 root     root        13912 Apr 14 20:33 cat
-rwxr-xr-x    1 root     root        16216 Apr 14 20:33 chgrp
-rwxr-xr-x    1 root     root        15960 Apr 14 20:33 chmod
-rwxr-xr-x    1 root     root        18040 Apr 14 20:33 chown
-rwxr-xr-x    1 root     root        42892 Apr 14 20:33 cp
-rwxr-xr-x    1 root     root        47656 Jun 22  2002 cpio
lrwxrwxrwx    1 root     root           21 Nov 28 22:40 csh ->
/etc/alternatives/csh
-rwxr-xr-x    1 root     root        35288 Apr 14 20:33 date
-rwxr-xr-x    1 root     root        27052 Apr 14 20:33 dd
-rwxr-xr-x    1 root     root        27116 Apr 14 20:33 df
-rwxr-xr-x    1 root     root        64428 Apr 14 20:33 dir
-rwxr-xr-x    1 root     root         3804 Mar 21 18:16 dmesg
-rwxr-xr-x    1 root     root         9732 Feb  8 02:13 dnsdomainname
-rwxr-xr-x    1 root     root        11000 Apr 14 20:33 echo
-rwxr-xr-x    1 root     root        39544 Apr  2 11:23 ed
-rwxr-xr-x    1 root     root           33 Apr 21 12:02 egrep
-rwxr-xr-x    1 root     root        67436 Jan 23  2002 elvis-tiny
-rwxr-xr-x    1 root     root         8984 Apr 14 20:33 false
-rwxr-xr-x    1 root     root         2968 Mar 30 20:08 fdflush
-rwxr-xr-x    1 root     root           33 Apr 21 12:02 fgrep
-rwxr-xr-x    1 root     root        19392 Sep 27  2002 fuser
-rwxr-xr-x    1 root     root        67948 Apr 21 12:02 grep
-rwxr-xr-x    4 root     root        49288 Nov  6  2002 gunzip
-rwxr-xr-x    1 root     root         4745 Nov  6  2002 gzexe
-rwxr-xr-x    4 root     root        49288 Nov  6  2002 gzip
-rwxr-xr-x    1 root     root         9732 Feb  8 02:13 hostname
-rwxr-xr-x    1 root     root        11180 Mar 31 20:23 kill
-rwxr-xr-x    1 root     root        19448 Apr 14 20:33 ln
-rwxr-xr-x    1 root     root        34584 Mar  7 07:11 loadkeys
-rwsr-xr-x    1 root     root        35464 Nov 24 22:31 login
-rwxr-xr-x    1 root     root        64428 Apr 14 20:33 ls
-rwxr-xr-x    1 root     root         5056 Mar 29 20:16 lsmod
-rwxr-xr-x    1 root     root        35444 Mar  3 09:33 lspci
-rwxr-xr-x    1 root     root        16504 Apr 14 20:33 mkdir
-rwxr-xr-x    1 root     root        16204 Apr 14 20:33 mknod
-rwxr-xr-x    1 root     root         4620 Apr 12 13:30 mktemp
-rwxr-xr-x    1 root     root        26328 Mar 21 18:16 more
-rwsr-xr-x    1 root     root        76792 Mar 21 18:18 mount
lrwxrwxrwx    1 root     root           20 May 10  2002 mt ->
/etc/alternatives/mt
-rwxr-xr-x    1 root     root        14616 Jun 22  2002 mt-gnu
-rwxr-xr-x    1 root     root        44908 Apr 14 20:33 mv
-rwxr-xr-x    1 root     root        85036 Apr  9 16:48 netstat
lrwxrwxrwx    1 root     root           16 Jun  7  2002 pidof ->
../sbin/killall5
-rwsr-xr-x    1 root     root        15244 Nov 18  2001 ping
-rwxr-xr-x    1 root     root        57164 Mar 31 20:23 ps
-rwxr-xr-x    1 root     root         9752 Apr 14 20:33 pwd
lrwxrwxrwx    1 root     root            4 Mar  9 10:27 rbash -> bash
-rwxr-xr-x    1 root     root        10424 Apr 14 20:33 readlink
-rwxr-xr-x    1 root     root        24248 Apr 14 20:33 rm
-rwxr-xr-x    1 root     root        10680 Apr 14 20:33 rmdir
-rwxr-xr-x    1 root     root        10004 Apr 12 13:30 run-parts
-rwxr-xr-x    1 root     root        77720 Feb 14 17:41 sed
-rwxr-xr-x    1 root     root        18968 Apr 17 17:50 setserial
lrwxrwxrwx    1 root     root            4 Mar  9 10:27 sh -> bash
-rwxr-xr-x    1 root     root        11288 Apr 14 20:33 sleep
-rwxr-xr-x    1 root     root        32760 Apr 14 20:33 stty
-rwsr-xr-x    1 root     root        23144 Nov 24 22:31 su
-rwxr-xr-x    1 root     root         9752 Apr 14 20:33 sync
-rwxr-xr-x    1 root     root       128744 Oct 29  2002 tar
-rwxr-xr-x    1 root     root       269768 Jul  9  2002 tcsh
-rwxr-xr-x    1 root     root         5168 Apr 12 13:30 tempfile
-rwxr-xr-x    1 root     root        24312 Apr 14 20:33 touch
-rwxr-xr-x    1 root     root         8952 Apr 14 20:33 true
-rwsr-xr-x    1 root     root        39928 Mar 21 18:18 umount
-rwxr-xr-x    1 root     root        10680 Apr 14 20:33 uname
-rwxr-xr-x    4 root     root        49288 Nov  6  2002 uncompress
-rwxr-xr-x    1 root     root        64428 Apr 14 20:33 vdir
-rwxr-xr-x    1 root     root         3660 Jan 23  2002 vi
-rwxr-xr-x    4 root     root        49288 Nov  6  2002 zcat
-rwxr-xr-x    2 root     root         1974 Nov  6  2002 zcmp
-rwxr-xr-x    2 root     root         1974 Nov  6  2002 zdiff
-rwxr-xr-x    3 root     root         2944 Nov  6  2002 zegrep
-rwxr-xr-x    3 root     root         2944 Nov  6  2002 zfgrep
-rwxr-xr-x    1 root     root         1525 Nov  6  2002 zforce
-rwxr-xr-x    3 root     root         2944 Nov  6  2002 zgrep
-rwxr-xr-x    1 root     root          103 Nov  6  2002 zless
-rwxr-xr-x    1 root     root         1885 Nov  6  2002 zmore
-rwxr-xr-x    1 root     root         3498 Nov  6  2002 znew


Once you get a shell and cp on there, I would assume that there wouldn't
be any problems copying the rest from a floppy disk (if you have access
to another box to make one).  Perhaps you could write something that
uses kernel system calls (like mount(2) and sendfile(2)) to get those
two on there, and then work on the rest. Not really sure if this would
work.

I'm sure others will have better ideas.

Andrew




More information about the nylug-talk mailing list