LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 08-17-2004, 03:23 AM   #1
David@330
Member
 
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 this..so as i can use my commands again...??

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

Rep: Reputation: 370Reputation: 370Reputation: 370Reputation: 370
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
David@330
Member
 
Registered: Jul 2004
Location: South Africa
Posts: 146

Original Poster
Rep: Reputation: 15
Cool

Hi all

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


Dave.......
 
Old 08-17-2004, 01:58 PM   #4
Syclone
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.

Code:
/some/bad/place/mv source destination
/some/bad/place/ls
/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
Code:
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.
 
  


Reply


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


All times are GMT -5. The time now is 10:33 PM.

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