Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 08-17-2004, 03:23 AM   #1
Registered: Jul 2004
Location: South Africa
Posts: 146

Rep: Reputation: 15
Cool Bin Moved

Hi All

Can someone help me, i kind've move the bin directory and now, none of the commands work. Is their any way of getting around as i can use my commands again...??

Old 08-17-2004, 03:27 AM   #2
Senior Member
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,284

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Why not move bin back to where it was. That'ss be slightly tricky since /bin/mv doesn't exist any more. So you have to do <full path to new bin>/mv <full path to new bin> bin, so e.g. if you moved /bin to /some/place/else you would type:

/some/place/else/mv /some/pace/else /bin

This assumes /some/place/else is on the root filesystem. If not you'll need to cp -a since mv won't take directories across filesystems.
Old 08-17-2004, 03:40 AM   #3
Registered: Jul 2004
Location: South Africa
Posts: 146

Original Poster
Rep: Reputation: 15

Hi all

Yes it would be, if i could cp -a a directory but none of the commands work...cp, ll, mv, dir etc....

Old 08-17-2004, 01:58 PM   #4
LQ Newbie
Registered: Jul 2004
Posts: 2

Rep: Reputation: 0
Tried a livecd?

You can type any Linux command by entering the full path, just apply btmiller's advice. If you know where cp and mv have been moved to, you can enter the full path.

/some/bad/place/mv source destination
/some/bad/place/cp -a source destination

You could try using a Linux "LiveCD." This is a CD-ROM that runs a Linux distribution without installing to the hard drive. Some people use them to "try out" Linux without messing up the hard drive, but they're very useful as rescue discs. Just put the disc in the CD-ROM drive and boot your computer. The LiveCD loads instead of your regular operating system.

Getting a LiveCD:

Do you have the CD-ROMs from the distribution you installed? Many distros can use the first installation disk as a LiveCD. For example, boot from Red Hat disc 1 and type "linux rescue" at the boot: prompt.

You can also download and burn a more complete LiveCD. One of the most popular is Knoppix. It loads a complete X Window system. You could also try Damn Small Linux .
You can also download powerful rescue floppy such as Tom Oehser's tomsrtbt.

Any good LiveCD will allow you to mount your regular disk partition so you can make changes to it. (Knoppix does this automatically).
You can then
cp -a /mnt/mylinuxpartition/some/bad/place/bin /mnt/mylinuxpartition/bin
or suchlike.

You'd be using the LiveCD's copy of cp, mv, etc.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
sudo /usr/bin/chroot /home/chroot /bin/su - xxx| /bin/su: user xxx does not exist saavik Linux - General 3 07-04-2007 11:30 AM
Installing .bin-files, leave the file in /usr/local/bin/ ? lagu2653 Linux - Software 1 11-08-2005 09:30 PM
AaaaAAAaah help, I made a huge mistake :( accidentally moved /bin! yelgnits Linux - General 10 09-02-2004 08:08 AM
bin/bash:usr/bin/lpr NO SUCH FILE OR DIRECTORY Adibe_Hamm Linux - Newbie 3 10-14-2003 03:30 AM
Newbie needs help Installing j2sdk-1_4_2-nb_3_5_1-bin-linux.bin bendoku Linux - Newbie 5 10-11-2003 10:27 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 05:46 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration