Questions tagged [deleted-files]

128 questions
186
votes
14 answers

Recover deleted files on Linux

Is there a command to recover/undelete deleted files by rm? rm -rf /path/to/myfile How can I recover myfile? If there is a tool to do this, how can I use it?
pylover
  • 3,328
  • 6
  • 21
  • 26
68
votes
4 answers

undelete a just deleted file on ext4 with extundelete

Is there a simple option on extundelete how I can try to undelete a file called /var/tmp/test.iso that I just deleted? (it is not so important that I would start to remount the drive read-only or such things. I can also just re-download that file…
rubo77
  • 27,777
  • 43
  • 130
  • 199
38
votes
7 answers

Best way to free disk space from deleted files that are held open

Hi I have many files that have been deleted but for some reason the disk space associated with the deleted files is unable to be utilized until I explicitly kill the process for the file taking the disk space $ lsof /tmp/ COMMAND PID USER FD …
BryanK
  • 783
  • 1
  • 7
  • 12
34
votes
3 answers

I just deleted everything in my home directory. How? And why are some files still there?

Never thought this would happen to me, but there you go. ¯\_(ツ)_/¯ I ran a build script from a repository inside the wrong directory without looking at the source first. Here's the script Scripts/BuildLocalWheelLinux.sh: cd…
iFreilicht
  • 898
  • 10
  • 14
25
votes
2 answers

macOS rm command '-W' option - undelete

I was looking at the man page for the rm command on my MacBook and I noticed the the following: -W Attempt to undelete the named files. Currently, this option can only be used to recover files covered by whiteouts. What…
user14755
24
votes
1 answer

Updating disk free size without rebooting the host

I use RHEL4 with LVM2 on it. At times even after removing large files more than a GB, the partition size is not getting updated when using the df command. -bash-3.00$ df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/sys-root …
Kannan Mohan
  • 3,191
  • 2
  • 17
  • 16
22
votes
4 answers

What's the fastest way to remove all files & subfolders in a directory?

One program created lots of nested sub-folders. I tried to use command rm -fr * to remove them all. But it's very slow. I'm wondering is there any faster way to delete them all?
Lei Hao
  • 331
  • 1
  • 2
  • 5
12
votes
4 answers

How can I restore my default .bashrc file again?

I accidentally changed all the contents of the .bashrc file and I haven't scripted it yet so there's no problem for now. I added little scripts to it (just a few alias), so I can write them again one by one. How can I restore my .bashrc file with…
Ash
  • 135
  • 5
9
votes
7 answers

How to recover “deleted” files in Linux on an NTFS filesystem (files originally from macOS)

My girlfriend has a external hard disk with 10 years+ of photos, documents and more. A lot of these files originate from her old iPhone 5 and her MacBook. The hard disk itself is NTFS Format. Since the disk is so old, it turns into a hazard of data…
LukasH
  • 99
  • 1
  • 2
8
votes
2 answers

Recover deleted file that is currently being written to

I started downloading a big file and accidently deleted it a while ago. I know how to get its current contents by cping /proc//fd/ but since the download is still in progress it'll be incomplete at the time I copy it someplace else. Can I…
8
votes
2 answers

Secure wipe (scrub) filesystem of VPS from VPS itself

I have a VPS I'm planning to delete. This particular cloud provider makes no guarantee that the data on the drive will be wiped before giving the disk to the next person. What's a best effort attempt I can make to secure-wipe sensitive data (whether…
Michael Kropat
  • 379
  • 5
  • 12
7
votes
1 answer

How can I access a deleted open file on Linux (output of a running crontab task)?

I have an hourly hour-long crontab job running with some mtr (traceroute) output every 10 minutes (that is going to go for over an hour prior to it being emailed back to me), and I want to see the current progress thus far. On Linux, I have used…
cnst
  • 3,223
  • 2
  • 23
  • 44
7
votes
2 answers

On Mac OSX, how can I open a deleted file which is still open by a process?

b2-osx108v8-01:~ bamboo$ lsof -p 264 COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME java 264 bamboo 20w REG 1,2 240906 14883372…
Bwmat
  • 189
  • 4
7
votes
2 answers

What happens when the current directory is deleted?

In the first terminal A, I create a directory, enter the directory, and create a file: $ mkdir test $ cd test $ touch file1.txt $ ls file1.txt Then in another terminal B, I delete the directory: $ rm -r test $ mkdir test $ cd test $ touch…
wenzeslaus
  • 175
  • 5
7
votes
2 answers

How to recover the deleted binary executable file of a running process

I have a process running very long time. I accidentally deleted the binary executable file of the process. Since the process is still running and doesn't get affected, there must be the original binary file in somewhere else.... How can I get…
syko
  • 675
  • 3
  • 9
  • 15
1
2 3
8 9