🖥️look

➡️This is a command-line reference manual for commands and command combinations that you don’t use often enough to remember it. This cheatsheet explains the look command with important options and switches using examples.

▁ ▂ ▃ ▄ ꧁ 🔴☠ COMMANDLINE-KUNGFU WITH CHEATSHEETS ☠🔴꧂▅ ▃ ▂ ▁

#                ██╗      ██████╗  ██████╗ ██╗  ██╗
#                ██║     ██╔═══██╗██╔═══██╗██║ ██╔╝
#                ██║     ██║   ██║██║   ██║█████╔╝ 
#                ██║     ██║   ██║██║   ██║██╔═██╗ 
#                ███████╗╚██████╔╝╚██████╔╝██║  ██╗
#                ╚══════╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝

# Look for lines in sorted file (Mac OS X)

# Look for lines which begins with the given prefix:
look prefix file

# Look for lines ignoring case:
look -f prefix file                                                 

look . | egrep "^s.*m.*b" | egrep "^.{4,9}$" 
# Show a list of the other candidates for an open source SMB service.

look . | grep -E "^[a-z]{4,7}$" > wordlist ; rev wordlist > wordlistrev ; grep -x -f wordlistrev wordlist 
# Find words that make other words backwards. This can take a while. This example limits to words 4-7 letters long but you can change the regex for longer/shorter words I meant only uses a specific number of characters. Ex: for i in {1..8} ; do look . | grep -E "^[a-z]{$i}$" > wordlist ......

look . | grep -E "^[a-z]{2,}$" | sort > wordlist ; rev wordlist | sort > wordlistrev ; comm -12 wordlist wordlistrev 
# Find words that have a reverse which is also a word.

look . | egrep "^[a-g]{4,}$" 
# Find 4+ letter words that are spelled using only musical note letters.
# Note that on the last one, -text{2..4} expands to -text2 -text3 -text4  So the lack of a space is important. BRACE EXPANSION!

#==============================##==============================#
# CMD LOOK						       #
#==============================##==============================#
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░

  █║▌│║█║▌★ KALI ★ PARROT ★ DEBIAN 🔴 PENTESTING ★ HACKING ★ █║▌│║█║▌

              ██╗ ██╗ ██████╗  ██████╗ ██╗  ██╗███████╗██████╗
             ████████╗██╔══██╗██╔═══██╗╚██╗██╔╝██╔════╝██╔══██╗
             ╚██╔═██╔╝██║  ██║██║   ██║ ╚███╔╝ █████╗  ██║  ██║
             ████████╗██║  ██║██║   ██║ ██╔██╗ ██╔══╝  ██║  ██║
             ╚██╔═██╔╝██████╔╝╚██████╔╝██╔╝ ██╗███████╗██████╔╝
              ╚═╝ ╚═╝ ╚═════╝  ╚═════╝ ╚═╝  ╚═╝╚══════╝╚═════╝

               █║▌│║█║▌ WITH COMMANDLINE-KUNGFU POWER █║▌│║█║▌

░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░