Created
May 16, 2023 20:06
-
-
Save sk0x1234/46ba149bacb2c7e1f381c9d206bad8c1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add filenames to a file | |
$ while read -r line ;do find / -type f -name $line -ls 2>/dev/null ; done < ./filenames.txt | |
#ip address | |
$ while read -r line ;do find / -type f -name $line -exec grep -l -E -o "([0-9]{1,3}[\.]){3}[0-9]{1,3}" {} \; 2>/dev/null ; done < ./filenames.txt | |
#sha1sum | |
$ while read -r line ;do find / -type f -name $line -exec sh -c "ls -l {} ;cat {} | sha1sum" \; 2>/dev/null ; done < ./filenames.txt | |
#wc 230? find a file below which doenst have name in orginal filelist | |
$ while read -r line ;do find / -type f -name $line -exec sh -c "wc -l {}" \; 2>/dev/null ; done < ./filenames.txt | |
# last 2 can be solved by #check for id 502 # check for other permissions +x | |
$ while read -r line ;do find / -type f -name $line -exec ls -n {} \; 2>/dev/null ; done < ./filenames.txt | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment