hi,
need either 1 liner or bash script recursively search folder/sub folders binary files (windows .lnk files) containing specific text string. if finds match must delete file.
after googling number of hours i've come accross below 1 liner.
why not work?
code:find . -name '*.lnk' -print0 | xargs -0 grep -i "c:" | xargs -0 rm -f
Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk Bash one liner to rm files based on content
Ubuntu
Comments
Post a Comment