0
(0)

one neat function of find, it that what it found can be passed to another function for further processing.

or: it can delete the file

BUT

this can go horribly wrong (and it does not ask for confirmation)

… deleting EVERYTHING in the current directory within the blink of an eye (depending on systems speed… terrabytes of data within seconds).

# warning! this can ruin one's day

mkdir temp
cd temp
touch 1 2 3 f25020672.avi

# only finds that file
find . -name "*f25020672.avi*"
./f25020672.avi

# DANGER! THIS DELETES

# ALL (!!!)

# FILES IN THE CURRENT DIRECTORY! (NOT ONLY THE -name “*FILES*” SPECIFIED )

find . -delete -name "*f25020672.avi*"

# this would have been the correct way to do it
find . -name "*f25020672.avi*" -delete

guess will have to powerdown, and continue when the backup-system of the backup-system is ready X-D

those are the times – when ext3 is better than ext4 (extundelete can WITH EASE recover the files INCLUDING THE FILENAMES, under ext4, no filenames, without filenames and paths… it’s hard to identify what file is what)

undelete?

on ext3, this is no problem, on ext4… photorec can restore photos, but not filenames… so probably a major problem…

ext3undelete ext4undelete extundelete linux undelete recover deleted files – extundelete Bad magic number in super-block when trying to open filesystem – DO NOT ATTACH EXTERNAL USB-SATA HARDDISK DIRECTLY TO SATA

average rating 0 / 5. based on ratings 0

not rated yet

admin