Linux Classroom notes 24/July/2026

Search commands:

Find: search the file by name, type or attributes

  • find ~/ -name “github.pem” # find by file name
  • find . -type f # find all files in specific directory
  • find . -type d # get all directory and sub directory specific location
  • find . -mtime -7 # get modified files in last 7 days

grep – search inside a file

  • grep “error” filename # find string
  • grep -i “error” file name # case-insestive search
  • grep -r “error” src/ search all files in dir and sub dir
  • grep -n “error” logfile.txt # print line number where error find

locate – fast filename search

locate github.pem

link – one file point to another file point

ln

  • softlink : if delete original file application will break

  • hardlink : this will works still delete original file

  • ln -s source desc

  • ln source desc

compress the files using tar

  • tar -czvf spring.tar spring-petclinic/

    • -c create file
    • -z zip file
    • -v vebsore
    • -f force
  • tar -xzvf spring.tar

  • Extract to a specific folder: tar -xf filename.tar.gz -C /path/to/directory

Leave a ReplyCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Please turn AdBlock off
Social Media Icons Powered by Acurax Web Design Company

Discover more from Direct DevOps from Quality Thought

Subscribe now to keep reading and get access to the full archive.

Continue reading

Exit mobile version
%%footer%%