bug-findutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #63765] Unexpected deletions : find warnings with missing selection


From: me
Subject: [bug #63765] Unexpected deletions : find warnings with missing selection (true bug or half way between bug and non-bug ?)
Date: Sun, 5 Feb 2023 17:29:19 -0500 (EST)

URL:
  <https://savannah.gnu.org/bugs/?63765>

                 Summary: Unexpected deletions : find warnings with missing
selection (true bug or half way between bug and non-bug ?)
                 Project: findutils
               Submitter: mee
               Submitted: Sun 05 Feb 2023 10:29:17 PM UTC
                Category: find
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
                 Release: None
         Discussion Lock: Any
           Fixed Release: 4.8.0


    _______________________________________________________

Follow-up Comments:


-------------------------------------------------------
Date: Sun 05 Feb 2023 10:29:17 PM UTC By: me <mee>
I read the Warning messages section, plus man's NON-BUGS section and used the
"The most efficient and secure method..." in Using the -delete action from 10
Worked Examples / 10.1 Deleting Files.

Context: after tens hours of photorec data recovery from a defective disk I
purged unneeded files in the target recovery dir ~/recup this way (I first got
ownership of the "recup" tree as recovery worked as root - just to say this
"bug" report is not security related):
I visually parsed the hundreds recup sub-folders recup_dir.xxx and to treat
the whole tree I issued commands as 

me@me:~/recup$ find . -type f -iname *.exe -delete
me@me:~/recup$ find . -type f -iname *_*mui -delete
and so on. At a point I was fed up using left arrow key to traverse back the
-delete action to change the pattern so I had the idea to change the order of
things like many linux commands allow:
me@me:~/recup$ find . -delete -type f -iname *.chm
which ended, you surely know what, whole tree deletion. Fortunately I had
setup a syncthing share for ~/recup , so the deletion of ~/recup/.stfolder
immediately broke the synchronisation and I didn't loose any data nor previous
work, regards to deleting/recreating the syncthing folder share on working
machine which uploaded back the yet worked tree.

The thing is I'm a casual find user that seldom uses find's action and I'm
often (although less and less) caught by "find: paths must precede
expression:".

>From the manual when no start point is given "." is assumed. Trying "find
-delete" ATM, I just mkdir ~/test, ... but as I forgot to "cd test" I broke my
whole profile with no warning because find then catches everything. I was a
bit frightened it would also catch "./.." as ls shows: no need :-(

No way to have a special handling when using -delete and no startpoint is
given and+or no target selection like -name or -type or anything ?   







    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?63765>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]