LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices



Reply
 
Search this Thread
Old 10-19-2008, 11:58 PM   #1
scoreone1
LQ Newbie
 
Registered: Oct 2008
Posts: 4

Rep: Reputation: 0
Help me...after used mv command all file missing only folder move to new path


dear all...i'm newbie here n for linux environment...i try to move my folder at /home to new path /tmp where at this folder i have very2 important file. after used this command
Code:
mv /home/ShortCodeRelay /tmp/newShortCodeRelay/
all my file gone....only folder palace in new path....someone please help me...any idea....
 
Old 10-20-2008, 02:20 AM   #2
kenneho
Member
 
Registered: May 2003
Location: Oslo, Norway
Distribution: Ubuntu, Red Hat Enterprise Linux
Posts: 655

Rep: Reputation: 40
I didn't quite understand what your problem was. Would you care to elaborate?
 
Old 10-20-2008, 02:38 AM   #3
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
It's quite possible that your /tmp has been flushed - it is a system temporary directory, not somewhere you should be using to store files. If they've truly been deleted then they are gone.

Do you have a backup?

Do you know the name of one of the files? Do a search for one of the files (say it's file1)

find / -name file1 -type f

I don't much fancy your chances though.
 
Old 10-20-2008, 02:45 AM   #4
deepsix
Member
 
Registered: Apr 2003
Distribution: ANY
Posts: 337

Rep: Reputation: 31
Quote:
Originally Posted by scoreone1 View Post
dear all...i'm newbie here n for linux environment...i try to move my folder at /home to new path /tmp where at this folder i have very2 important file. after used this command
Code:
mv /home/ShortCodeRelay /tmp/newShortCodeRelay/
all my file gone....only folder palace in new path....someone please help me...any idea....
if what you said you did is what you did you moved /home/Shortxxx to /tmp/newShortxxx but unless u have write priveleges to /tmp/newShortxxx the mv will not work....u need root priveleges or attributes that allow you to write to that folder.. try this : mv /home/Shortxxx /home/Shortxxx/newShortxxx and see if that helps.... or make a directory called /home/Shortxxx/tmp and use that

did you try ls /home/Shortcodexxx cause it problably didnt move....

Last edited by deepsix; 10-20-2008 at 02:54 AM.
 
Old 10-20-2008, 02:50 AM   #5
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
But he will have write privileges, since /tmp is usually 1777
 
Old 10-20-2008, 03:27 AM   #6
scoreone1
LQ Newbie
 
Registered: Oct 2008
Posts: 4

Original Poster
Rep: Reputation: 0
thanks all...for ur reply...FYI my /tmp folder was sharing from other server....so i move all my server file from /home/shortXXX to /tmp/newshortxxx...i'm using root...suprisely after i used command mv...walla only folder there....but the file was gone...sadly i d't have any backup.....


Code:
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                      5.8G  4.7G  807M  86% /
/dev/sda1              99M   14M   80M  15% /boot
/dev/shm              506M     0  506M   0% /dev/shm
/dev/sdb1             7.8G  5.8G  1.7G  79% /home
192.168.2.10:/opt/temp_share
                      242G  1.2G  229G   1% /tmp
 
Old 10-20-2008, 03:47 AM   #7
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
Is "/home/ShortCodeRelay" a directory or a file? It is usually a good idea to add a slash after directory names so that there is never any question.

If /home/ShortCodeRelay is a directory, the command you gave should have worked. However if /tmp/newShortCodeRelay already existed, you will end up with /tmp/newShortCodeRely/ShortCodeRelay.

If it was a file, then you should have gotten an error about /tmp/ShortCodeRelay/ doesn't exist.

Could you check your .bash_history (if you have logged out of that shell) and double check the actual command executed?

Your /tmp/ directory seems very large to me. If you share a directory, use something like /srv/nfs/<share-name>/ instead of a directory on /tmp. Most systems are configured to clear /tmp when rebooting and deleting older files there on a running system.

Last edited by jschiwal; 10-20-2008 at 03:49 AM.
 
Old 10-20-2008, 04:09 AM   #8
scoreone1
LQ Newbie
 
Registered: Oct 2008
Posts: 4

Original Poster
Rep: Reputation: 0
  • confirm this is example file i move
Code:
mv 28800/ /tmp/CGMT_BACKUP/
  • and i never get any error message like "/tmp/ShortCodeRelay/ doesn't exist"
  • one more thing i never reboot my machine
 
Old 10-20-2008, 04:14 AM   #9
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Did you try the find command I suggested?
 
Old 10-21-2008, 12:22 AM   #10
scoreone1
LQ Newbie
 
Registered: Oct 2008
Posts: 4

Original Poster
Rep: Reputation: 0
yeah billy.....i did it...sadly there was nothing...i mean the file i try 2 find wasn't there....however i'm glad that my ex senior already make an VM image for that server...may b there have backup....hope so....thanks all for ur quick/fast cooperate....thanks God i found this community.....
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
~/.dmrc file is missing after home folder wipe jmite Linux - Newbie 1 08-22-2008 12:57 PM
making a script that will move a file or files in a trash folder Paxmaster Programming 5 12-12-2004 07:00 PM
Cant move a folder to another path? dwarf007 Linux - Newbie 2 09-19-2004 03:28 AM
Move file command? oldrelac Linux - Newbie 10 08-08-2003 12:58 PM


All times are GMT -5. The time now is 08:39 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration