best way to find and delete (may contains directories)

2021-03-26 Thread Peng Yu
Hi, If just find is used, the following error will be printed. There are many ways to solve this problem. $ mkdir -p {x..z}/0/ $ touch {x..z}/0/1.txt $ find -name 0 -delete find: cannot delete ‘./z/0’: Directory not empty find: cannot delete ‘./x/0’: Directory not empty find: cannot delete ‘./y/0

Re: [Non-DoD Source] Re: Please advise work around or bug fix

2021-03-26 Thread Bob Proulx
Bob Proulx wrote: > Then I would use this following technique since it effectively exactly > answers the question you asked. Try this: > > find . -size +1k -exec sh -c 'ls -1sd "$@"' sh {} + Berny asked me why I chose to do it that way instead of the simpler and more direct following. fi

RE: [Non-DoD Source] Re: Please advise work around or bug fix

2021-03-26 Thread Yuen, Kam-Kuen CIV USARMY DEVCOM AC (USA)
Bob, Thanks a lot for the info. Greatly appreciated. Kam US ARMY, CCDC Armaments Software Engineering Center B31 Third Ave Picatinny, NJ 07806 Office: 973.724.8856 -Original Message- From: Bob Proulx Sent: Thursday, March 25, 2021 4:37 PM To: Yuen, Kam-Kuen CIV USARMY DEVCOM SC (USA)