11-17-2012
If your system administrator made backups of your files, you can ask to havemyfile restored to the value it had when it was last backed up before you recreated it. Otherwise, it is probably gone.
If no one has overwritten the blocks that were freed when you recreated the file, the data might still exist on unallocated blocks on the the hardware underlying that filesystem. If you are that lucky and it is EXTREMELY important that you recover that data, immediately unmount that filesystem and then find an expert to help you search the free list for your data.
8 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Dear People
I have removed some of my files and directories( by using rm and rmdir commands) by mistake. I wish to bring them back. How is it possible?( I am using solaris 2.6)
best regards
Reza Nazarian:( (2 Replies)
Discussion started by: Reza Nazarian
2 Replies
2. Shell Programming and Scripting
I have the following requirement.
file1.txt (this could contain 5 million rows)
ABC 1234 XYZ .... (3000 bytes)
QRD 4612 GHT .... (3000 bytes)
I need to create
file2.txt
1234
4612
I have a EAI process to change file2.txt into
file3.txt
4555
3743
Then I would have to use... (0 Replies)
Discussion started by: jostul
0 Replies
3. Linux
I deleted my partition on a test server and want to
bring back the partition.
I have not rebooted yet, so system is operational.
I have the /proc/partition
major minor #blocks name
8 0 195359960 sda
8 1 1044224 sda1
8 ... (2 Replies)
Discussion started by: photon
2 Replies
4. Solaris
Hi all,
I have a problem, when I use script with 'expect', accidentally I was deleted root account by "userdel root". Unfortunately, it works, because no other root user login on it. Solaris document said that root cannot delete root, but in my case it works because it deleted by script, not... (7 Replies)
Discussion started by: joash
7 Replies
5. Shell Programming and Scripting
Hi
We have a shell script to find a string in a large set of files and replace it using the sed command.in the same time we also want to store the list of files it checked.
***
The existing script is as below
#!/bin/bash
#1
_r1="inst_group=ems7770"
_r2="inst_group=dba"
# Escape path... (4 Replies)
Discussion started by: sabkan
4 Replies
6. Solaris
:confused:
when i tried to look the status of DNS-client, it is in maintenance mode.....
Please tell me how to bring it back to online mode...PLEASE TELL ME STEP BY STEP.... PLEASE...
:wall: (2 Replies)
Discussion started by: vamshigvk475
2 Replies
7. Shell Programming and Scripting
Hi All,
I have to work in the late nights some times for server maintenance and in a hurry to complete I am accidentally changing ownership or permission of directories :(
which have similar names ( /var in root and var of some other directory ).:confused:
Can some one suggest me with the... (1 Reply)
Discussion started by: shiek.kaleem
1 Replies
8. Red Hat
Hi Folks,
Looking for some assistance here on a Dell server connected to a Dell tape robot with Redhat 5.4 and Netbackup 6.5.
Netbackup thinks the tapes are all present and working, but they are not - we lost the internal encryption keys earlier but think that they are reinstated as the... (0 Replies)
Discussion started by: gull04
0 Replies
LEARN ABOUT DEBIAN
zerofree
ZEROFREE(8) System Manager's Manual ZEROFREE(8)
NAME
zerofree -- zero free blocks from ext2, ext3 and ext4 file-systems
SYNOPSIS
zerofree [-n] [-v] [-f fillval] filesystem
DESCRIPTION
zerofree finds the unallocated, blocks with non-zero value content in an ext2, ext3 or ext4 filesystem (e.g. /dev/hda1) and fills them with
zeroes (or another octet of your choice).
Filling unused areas with zeroes is useful if the device on which this file-system resides is a disk image. In this case, depending on the
type of disk image, a secondary utility may be able to reduce the size of the disk image after zerofree has been run.
Filling unused areas may also be useful with solid-state drives (SSDs). On some SSDs, filling blocks with ones (0xFF) is reported to trig-
ger Flash block erasure by the firmware, possibly giving a write performance increase.
The usual way to achieve the same result (zeroing the unallocated blocks) is to run dd (1) to create a file full of zeroes that takes up
the entire free space on the drive, and then delete this file. This has many disadvantages, which zerofree alleviates:
o it is slow;
o it makes the disk image (temporarily) grow to its maximal extent;
o it (temporarily) uses all free space on the disk, so other concurrent write actions may fail.
filesystem has to be unmounted or mounted read-only for zerofree to work. It will exit with an error message if the filesystem is mounted
writable. To remount the root file-system readonly, you can first switch to single user runlevel (telinit 1) then use mount -o remount,ro
filesystem.
zerofree has been written to be run from GNU/Linux systems installed as guest OSes inside a virtual machine. In this case, it is typically
run from within the guest system, and a utility is then run from the host system to shrink disk image (VBoxManage modifyhd --compact, pro-
vided with virtualbox, is able to do that for some disk image formats).
It may however be useful in other situations: for instance it can be used to make it more difficult to retrieve deleted data. Beware that
securely deleting sensitive data is not in general an easy task and usually requires writing several times on the deleted blocks.
OPTIONS
-n Perform a dry run (do not modify the file-system);
-v Be verbose;
-f value Specify the octet value to fill empty blocks with (defaults to 0). Argument must be within the range 0 to 255.
SEE ALSO
dd (1).
AUTHOR
This manual page was written by Thibaut Paumard <paumard@users.sourceforge.net> for the Debian system (but may be used by others). Permis-
sion is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 or any later
version published by the Free Software Foundation.
On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL-2.
ZEROFREE(8)