We are introduced to Replit (for collaborative coding) and Cocalc (good for running various version of Python or different blocks of code in one place). Also we came to know about colab.google

Tasks List (Pending)

  1. Tryhackme Linux -1,2,3 room ( whatever you can ) https://tryhackme.com/module/linux-fundamentals
  2. Linux book for hackers: Linux Basics For Hackers: Getting Started with Networking, Scripting and Security in Kali (also mentioned on Day 1). Another book is also provided today. Get it here: https://t.me/c/1909610479/1356
  3. Linux Reference Book with 1500 pages. Get it here: https://t.me/c/1909610479/1364
  4. Courses: https://www.coursera.org/professional-certificates/google-it-automation#courses (shared by Binta Ansary apu)

Linux Commands

Untitled

Untitled

Untitled

pwd //this will print your current directory

cd /var
//If you want to navigate to the "/var" directory regardless of your current location, always use the absolute path with the leading slash

cd var
//this will only work when var directory is exists UNDER your current directory

cd //this will take you to the root directory 

//use tab to show the avaiable files in the working directory 

//create a new file- 3 different ways
touch filename.extension
nano filename.extension //this will use the nano editor //To save the file, press Ctrl + O (Write Out) and then Ctrl + X to exit Nano.
echo "This is the content of my new file." > my_file.txt

//output redirection > and >>
//these both will create a new file if the file does not exist
//but if the file exists, then > will overwrite the content of the target file
// on the other hand, >> will append 
python main.py >> myfile.txt

//cat command read the file/s content and show it/them on terminal
cat filename
cat filename1 filename2 filename3

cat //only cat command will let you enter any number of lines and will echo them in the terminal
cat >> filename.txt
cat > filename.txt // so this command will echo what you write in the terminal to the filename.txt

cat filename | grep "Version" 
//so here the grep command will run on the output of cat command

//press ^C (cntl + C) to terminate any command

cat rockyou.txt | head - 10
//this will show the first 10 lines from the rockyou.txt

cat rockyou.txt | tail - 10
//this will show the last 10 lines from the rockyou.txt

tail -f rockyou.txt 
//this will show the latest lines from rockyou.txt BUT WILL NOT EXIT THE COMMAND which means
//you can see lines that are newly inserted to the file while the command is running

awk command

is used for **pattern scanning and processing (**like if they are space or comma separated items, there is a pattern and we can process them like print only the items on the 3rd column or so…)

<aside> 💡 `awk options 'selection _criteria {action }' input-file > output-file

//for example $ awk '{print $1,$4}' employee.txt`

</aside>

https://www.geeksforgeeks.org/awk-command-unixlinux-examples/

https://www.digitalocean.com/community/tutorials/awk-command-linux-unix

https://www.freecodecamp.org/news/the-linux-awk-command-linux-and-unix-usage-syntax-examples/

https://www.tutorialspoint.com/awk-command-in-linux-with-examples