Skip to main content

Linux command: find - search for files in a directory hierarchy

seek and you shall find

find - search for files in a directory hierarchy

Hint:

find WHERE WHAT

Find files larger than 1GB

$ find . -type f -size +1G

Find files smaller than 1GB

$ find . -type f -size -1G

Find ALL files larger than 100MB and sort by size

$ find / -type f -size +100M 2>/dev/null -exec ls -sh {} \; | sort -h

For ethical hacking

Find files with SUID

find / -perm -u=s -type f 2>/dev/null
find / -perm -4000 -type f 2>/dev/null
On Windows, use dir to search for files/directories:
dir filename /s

Popular posts from this blog

Ping group on Windows with FOR command

Notes from daily work situation.

Powershell: Test-NetConnection

PS C:\Users\tuyen> get-help Test-NetConnection NAME     Test-NetConnection SYNTAX     Test-NetConnection [[-ComputerName] <string>] [-TraceRoute] [-Hops <int>] [-InformationLevel {Quiet |     Detailed}]  [<CommonParameters>]     Test-NetConnection [[-ComputerName] <string>] [-CommonTCPPort] {HTTP | RDP | SMB | WINRM}     [-InformationLevel {Quiet | Detailed}]  [<CommonParameters>]     Test-NetConnection [[-ComputerName] <string>] -Port <int> [-InformationLevel {Quiet | Detailed}]     [<CommonParameters>]     Test-NetConnection [[-ComputerName] <string>] -DiagnoseRouting [-ConstrainSourceAddress <string>]     [-ConstrainInterface <uint32>] [-InformationLevel {Quiet | Detailed}]  [<CommonParameters>] ALIASES     TNC REMARKS     Get-Help cannot find the Help files fo...

Data Recovery Softwares

Follow 3-2-1 backup rule so you do not need these data recovery softwares.