General :: Ubuntu - File Was Deleted And Then Reappeared When Folder Was Zipped
May 11, 2010
I am using Backtrack 4 Final, which is a Linux distro that is Ubuntu based. I had a directory that contained around 5 files. I deleted one of the files, which sent it to the trash. I then zipped the directory up (now containing 4 files), using this command:
zip -r directory.zip directory/
When I then unzipped directory.zip, the file I deleted was in there again. I couldn't believe this, so I zipped up the directory again, and the file reappeared again but this time could not be opened because the operating system said it didn't exist or something. I don't remember the exact error, and I cannot make this happen again. why a file that was deleted from a directory would reappear in that directory after it was zipped up?
So I have a script that simply unzips a file with a line:
unzip /path/to/file.zip
which unzips and puts the unzipped directory in the same directory as my script. The issue is, I want the unzipped directory to be in the same directory as the original zipped file.
I googled and found the -d flag which would let me specify what directory to put it in but the script asks the user to define the directory so I don't see how I could use that (because the user specifies the path all the way to the zipped file, not just the directory where the zipped file is)
I want to know if there is anyway I can extract the first few contents of a zipped file and then the next fixed and so on? For example, suppose I have a zipped file containing 1000000 natural numbers and I want to extract the first thousand numbers and then the next thousand numbers (1001-2000) and so on till I reach the end. Is this possible?
By naming one of my folders wrong I thought I don't need it anymore and pressed delete button while holding shift. Is there any way I could get that folder back? (I'm actually looking for the file inside that folder - .conky config file to be more precise) I've tried scalpel and extundelete, but none of them worked.
I had been uploading pictures from camera to download fold. Had a lot in there. Thought right click delete would just delete the pictures. Deleted folder too.
I lost my folder name "....hemanth" while moving the folder "....hemanth" to "Documents" using mv command in the terminal. As there is already a folder named Documents in that destination folder I lost folder. How to retrieve the folder as that folder is very important for me.
Somebody deleted a folder from /opt, now how I to know who did it? should I login to every user from root and check the history? or there is better and easy solution?
I'm running Mac OS X 10.5.8. I was recently uninstalling mysql5 from /opt/local/bin.I typed:rm -rf /opt/local/bin mysql*instead ofrm -rf /opt/local/bin/mysql*This deleted my entire /opt/local/bin directory which puts me in a bit of a bind.Is there any way to recover those files? If not, I have a friend that is using a similar set of programs, would it be possible to use the contents of his folderIf I end up needing to reinstall everything in this folder, what is the best way to go about doing this?
I used the ext3 format when I formatted my partition prior to installing Ubuntu10.10. I had accidentally deleted a file and began the process to get it back. It wasn't critical but helpful to recover the file. To make a long story short I ran into to some unexpected road blocks. I tried to use PhotoRec to get the job done but with no success.
I'm just looking down the road in the event I might have to recover something important.If it would be better going back to the Fat32 file system I would rather do it sooner than later. Just as a side note I am dual booting between linux and windows.
None of my daemon scripts work now, and the startup process displayed errors. Should I reinstall the OS and start from scratch, or is there a way to recover these files? Is there a way to rebuild the files I deleted?
I'm running debian 2.6.32-5-amd64 and have spent an interesting day trying to get nvidia-glx running...What appears to be happening, is that installing nvidia-glx uninstalls X.I've tried various installation methods (Synaptic, apt-get, module-assistant) and the final result seems to always be /usr/bin/X not found.Re-installing X blows away nvidia-glx.The symptoms look a lot like this post: viewtopic.php?f=7&t=45188Is it possible that this problem has returned?
The man page for rm says Quote:Note that if you use rm to remove a file, it is usually possible to recover the contents of that file. Do you know of a way to recover a file deleted with rm?
Two month ago I accidentally deleted my home folder (yes, very stupid idea but it wasn't on purpose).
I managed to recover the home folder from /home/.Trash-0/tobias by copying it back to where it belongs and changing the file ownership from "root" to my user (tobias).
After this recovery I tried to delete /home/.Trash-0/tobias but it wouldn't work. Whenever I tried, a new folder appeared in /home/.Trash-0/ (root home) named tobias.2, tobias.2.2 and so on. (see first screenshot). This means I had two copies of my home folder on my hard disk (2 x 156.1 GB at that time).
At that time I didn't care since I had enough disk space left (33.8 GB, see second screenshot) and thought Ubuntu would take care of this some time by removing the files in /home/.Trash-0/.
Fast forward to today, I get warnings of low disk space. My home folder today is around 160 GB but together with the deleted one in /.Trash-0/ I only have 1.3 GB disk space left in my home folder.
Any ideas how to delete the unused second home folder copy? Or is there some other way to free the disk space occupied by .Trash-0/ ?
I accidentally cut and paste two folders into my flash disk. then i deleted the folders from my flash. How can I recover the folders? They are not in my PC trash.
I deleted my music folder suddenlyIt was empty so I am not worry about data losingbut after that recreate a folder with same name its default icon wont come backwhat should I do?I am aware that I can set icon manually but I am looking for a method that ubuntu recognize that by itself.
Say I have a file that's downloading (from a source that's hard to re-download from), but accidentally deleted from the filesystem namespace (/tmp/blah), and I'd like to recover this file. Normally I could just cp /proc/$PID/fd/$FD /tmp/blah, but in this case that would only get me a partial snapshot, since the file is still downloading. Furthermore, once the download completes, the downloading process (e.g. Chrome) will close the FD. Any way to recover by inode/create a hard link? Any other solutions? If it makes any difference, I'm mainly concerned with ext4.
I'm new to Ubuntu (at least on server distributions). I used debian versions for a long time and thought, to try ubuntu LTS 10.0.4, because of the long time support cycle. I had problems, to install this distribution on a x86 platform (used with ASUS P4B533-v), because of kernel panic after installation. So I used a trick to get it running. I installed Ubuntu LTS 8.04 and compiled a kernel 2.6.34 and made a distupgrade. All went o.k. and is now running as a productive system.
My question now belongs to the used pid folder /var/run. I'm using some self compiled programs and had to create a separatly folder (e.g. /var/run/stunnel). My problem is, after rebooting the system, the folder is deleted automatically! Never saw this issue on other distributions. Is there any reason why? Of course, I can write a section in my init script, searching for existing folder and if not, creating it ...
I created a pendrive USB Fedora OS, worked fine. Installed a few bits and pieces, but when I used it again most of the files have disappeared (corrupt, deleted?). This happened before, just after I put a load of updates on. I am certain it cannot be rescued, but how can I prevent this (apart from backing up)?