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

Linux command: printenv

printenv - print all or part of environment NAME        printenv - print all or part of environment SYNOPSIS        printenv [OPTION]... [VARIABLE]... DESCRIPTION        Print  the  values  of the specified environment VARIABLE(s).  If no VARIABLE is speci‐        fied, print name and value pairs for them all.        -0, --null               end each output line with NUL, not newline        --help display this help and exit        --version               output version information and exit        NOTE: your shell may have its own version of printenv,  which  usually  supersedes  the        version  described  here.  Please refer to your shell's documentation for d...

Linux command: tail

tail - output the last part of files

Linux command: top

NAME        top - display Linux processes SYNOPSIS        top -hv|-bcHiOSs -d secs -n max -u|U user -p pid -o fld -w [cols]        The traditional switches `-' and whitespace are optional. DESCRIPTION        The  top program provides a dynamic real-time view of a running system.  It can display        system summary information as well as a list of processes or  threads  currently  being        managed  by  the  Linux  kernel.  The types of system summary information shown and the        types, order and size of information displayed for processes are all user  configurable        and that configuration can be made persistent across restarts.        The  program  provides a limited interactive interface for process manipulation ...