The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Any way to know wt command has been executed from last 2-3 days ? manoja422002 UNIX for Advanced & Expert Users 3 03-26-2008 10:22 AM
Is fsck executed during reboot for AIX? cteoh88 AIX 2 04-22-2007 05:18 PM
which processes executed first surjyap SUN Solaris 1 02-24-2006 02:24 PM
Staus of Executed Scripts pathanjalireddy Shell Programming and Scripting 11 05-12-2005 09:33 AM
ant not being executed as cron job kingfinny Shell Programming and Scripting 5 11-12-2004 01:11 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-11-2008
rakeshou rakeshou is offline
Registered User
  
 

Join Date: May 2007
Posts: 75
Angry HELP --Accidentaly executed mv ../* . in /tmp

Please help me, Its urgent.

I was in /tmp directory

and I accidentally executed as root

Code:


Code:
mv ../* .

in /tmp directory when it was supposed to be executed in some other directory.

Now none of my commands are working.

I tried setting up the path as:
Code:


Code:
export PATH=$PATH:/tmp/bin:/tmp/sbin:/tmp/usr/sbin:/tmp/usr/bin

but doesnt find mv, ls commands

I also tried to execute

Code:


Code:
/tmp/bin/mv /tmp/bin /tmp

but didnt work either.

Please Help me. I am not rebooting the system, as I know it will not boot...

HEEEEEELLLLLLLLLPPPPPPPPPPP
  #2 (permalink)  
Old 04-11-2008
era era is offline Forum Advisor  
Herder of Useless Cats (On Sabbatical)
  
 

Join Date: Mar 2008
Location: /there/is/only/bin/sh
Posts: 3,652
Doesn't find, or won't run them successfully?

The stuff in /bin (now /tmp/bin) should be statically linked, and so should work even if /lib is now in /tmp/lib

You could of course try to play with the LD_* stuff to also point to /tmp/lib instead of /lib, but this type of scenario is precisely why some of the most essential utilities in /bin are statically linked.

Idle thought: if you chroot /tmp there is no way then to move stuff to its parent directory (-:

If all else fails, do you have a rescue CD you could boot to fix things?
  #3 (permalink)  
Old 04-11-2008
Dave Miller's Avatar
Dave Miller Dave Miller is offline
Registered User
  
 

Join Date: Dec 2007
Location: Northern NJ, USA
Posts: 151
Quote:
/tmp/bin/mv /tmp/bin /tmp
I would think that it should be:

/tmp/bin/mv /tmp/bin /bin
or
/tmp/bin/mv -R /tmp/bin /bin

You may have to create the /bin directory first.
  #4 (permalink)  
Old 04-11-2008
matt.d's Avatar
matt.d matt.d is offline
Registered User
  
 

Join Date: Feb 2008
Location: /dev/null
Posts: 62
Untested - do not try it, just thinking.



Code:
 /tmp/bin/mv * ../


Last edited by matt.d; 04-11-2008 at 05:40 PM..
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:42 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0