HELP --Accidentaly executed mv ../* . in /tmp


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers HELP --Accidentaly executed mv ../* . in /tmp
# 1  
Old 04-11-2008
Network 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  
Old 04-11-2008
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  
Old 04-11-2008
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  
Old 04-11-2008
Untested - do not try it, just thinking.


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


Last edited by matt.d; 04-11-2008 at 05:40 PM..
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

/tmp filling up

Does anyone know of a way to redirect the ksh default of processing data in /tmp to another file system or / something else? My ksh script is parsing large DB files and it keeps filling up /tmp on the root disk. I have a 1 Tb disk with most of its space. How do I re-direct the /tmp ksh... (6 Replies)
Discussion started by: cchelten
6 Replies

2. AIX

Script not getting executed via cron but executes when executed manually.

Hi Script not getting executed via cron but executes successfully when executed manually. Please assist cbspsap01(appuser) /app/scripts > cat restart.sh #!/bin/ksh cd /app/bin date >>logfile.out echo "Restart has been started....." >>logfile.out date >>logfile.out initfnsw -y restart... (3 Replies)
Discussion started by: samsungsamsung
3 Replies

3. Solaris

cannot cd /tmp.

Hi All, There's a /tmp. folder on my solaris 9. I can't cd on it bash-2.05# uname -a SunOS cads105ctce 5.9 Generic_122300-30 sun4u sparc SUNW,Sun-Fire-V890 bash-2.05# cd /tmp. bash: cd: /tmp.: No such file or directory bash-2.05# ls -la /tmp. /tmp.: No such file or directory ... (5 Replies)
Discussion started by: itik
5 Replies

4. AIX

problem with tmp

Hello everyone ! I get a box with aix 5.3 and I get the /tmp fs on 100 %. I get a free space to get more bigger my fs but send me a error message. I try to make more bigger with smitty chlv but It doesnt work. Then I try to reduce somethings on the /tmp fs but I cant get in on a... (4 Replies)
Discussion started by: lo-lp-kl
4 Replies

5. AIX

/tmp full

The /tmp is 100% full, I found there are the following big files/directory: 1301500 syslog.out.58 166692 vac 158552 install.dir.2928686 158552 install.dir.2236636 110980 install.dir.2887698 /tmp/vac have some files like : .toc ... (3 Replies)
Discussion started by: rainbow_bean
3 Replies

6. UNIX for Dummies Questions & Answers

what is so special about /tmp/

I know that /tmp is used for memory or swap??? and that it should not be full ??? and that files under /tmp are automatically removed after a reboot??? Is this info true??? thx (16 Replies)
Discussion started by: melanie_pfefer
16 Replies

7. Red Hat

/tmp directory

i heard once that the /tmp directory was a ramfs (swap) that is cleared at reboot time, is this still the case in redhat EL 3 and 4 ? (1 Reply)
Discussion started by: BG_JrAdmin
1 Replies

8. AIX

/tmp full

good morning The /tmp filesystem is full at 99 % I have do a "rm" but the size is the same. so i think that a process is always alive, but how can i do to know it ? (because I have deleted some file in /tmp) thank you (9 Replies)
Discussion started by: pascalbout
9 Replies

9. Solaris

How To Shrink /Tmp

Hi, Do you know if we can shrink the size of the Swap under Solaris 8 ? 8Gb is already allocated to /TMP but we would like to reduce to 1 GB. Thanks, Fabien. (2 Replies)
Discussion started by: unclefab
2 Replies

10. UNIX for Dummies Questions & Answers

monitoring /tmp and /var/tmp for suspicous activity

Hello, does anyone have a script that can check the contents of the /tmp directory and for example e-mail the directory content if anything other than session files are present? Maybe there are better ways to monitor suspicous /tmp and /var/tmp activity, if so I'm listening :) (1 Reply)
Discussion started by: jamesbond
1 Replies
Login or Register to Ask a Question