Help me...after used mv command all file missing only folder move to new path
Linux - GeneralThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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....
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)
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....
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.....
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.
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.....
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.