Hacker Public Radio

HPR3353: My terminal journey, part 01.


Listen Later

My terminal journey, part 01. Becoming terminal friendly.
series: Apt Spelunking.
tags: terminal, apt-get, apt-cache, .bashrc
Book TLCL
The Linux Command Line: http://www.linuxcommand.org/tlcl.php
My .bashrc alias
# ls aliases
alias la='ls -Alh --group-directories-first'
alias lr='ls -lh --group-directories-first --recursive'
alias lar='ls -Alh --group-directories-first --recursive'
# safety first ;)
alias rmi='rm --interactive --verbose'
alias mvi='mv --interactive --verbose'
alias cpi='cp --interactive --verbose'
# cd reverse dir
alias ..='cd ..'
alias .2='cd ../..'
alias .3='cd ../../..'
alias .4='cd ../../../..'
alias .5='cd ../../../../..'
# cd dir
alias cd.d='cd ~/Documents/.dump'
# shutdown | reboot
alias ssn='sudo shutdown -P now'
alias sr='sudo reboot'
# Misc
alias nrpt='echo -e "nn---nnNew Reportnn---nn"'
My dump script
#!/bin/bash
dump=dump$(date +%m-%d-%Y).txt
pdat=$(date +%a_%b_%d_%Y_%T)
touch $dump;
echo -e "$pdat" > $dump; echo -e "nnThis file is used to store terminal output for later use; now get out!nn" >> $dump;
echo -e "nnDump file $dump is ready for use (created on $(date +%m-%d-%Y_%T)).nn"
My Upgrade script
#!/bin/bash
dp=dump$(date +%m-%d-%Y).txt
date | tee -a ./$dp; echo -e "n" | tee -a ./$dp;
sudo apt-get update | tee -a ./$dp; echo -e "n" | tee -a ./$dp;
echo -e "System Update Completed." | tee -a ./$dp; echo -e "n" | tee -a ./$dp;
sudo apt-get upgrade --yes | tee -a ./$dp; echo -e "n" | tee -a ./$dp;
echo -e "System Upgrade Completed." | tee -a ./$dp; echo -e "n" | tee -a ./$dp;
Commands
the upgrade example sudo apt-get update | tee -a ~/Documents/.dump/dump05-05-2021.txt; nrpt >> ./dump05-05-2021.txt;
the nmap example (plus the other command I couldn't remember while recording) apt-cache search nmap >> ./dump05-05-2021.txt; nrpt >> ./dump05-05-2021.txt; apt-cache showpkg nmap
the depends example apt-cache depends nmap >> ./dump05-05-2021.txt;
the download example sudo apt-get download dict dictd dict-wn dict-gcide artha
vim sudo apt-get vim; vimtutor
Terminal examples ~= home folder, CTRL + R= command search , CTRL + L= clear terminal, xdg-open= open files with default app.
Searching with grep example ls -lhAr ~ | grep -i bash >> ./dump05-05-2021.txt
the dump05-05-2021.txt file
Wed_May_05_2021_12:22:43
This file is used to store terminal output for later use; now get out!
Hit:1 http://dl.google.com/linux/chrome/deb stable InRelease
Ign:2 http://mirror.cs.jmu.edu/pub/linuxmint/packages ulyana InRelease
Get:3 http://security.ubuntu.com/ubuntu focal-security InRelease [109 kB]
Hit:4 http://mirror.cs.jmu.edu/pub/linuxmint/packages ulyana Release
Hit:5 http://mirror.cogentco.com/pub/linux/ubuntu focal InRelease
Hit:6 http://mirror.cogentco.com/pub/linux/ubuntu focal-updates InRelease
Hit:7 http://
...more
View all episodesView all episodes
Download on the App Store

Hacker Public RadioBy Hacker Public Radio

  • 4.2
  • 4.2
  • 4.2
  • 4.2
  • 4.2

4.2

34 ratings


More shows like Hacker Public Radio

View all
The Changelog: Software Development, Open Source by Changelog Media

The Changelog: Software Development, Open Source

290 Listeners

Defensive Security Podcast - Malware, Hacking, Cyber Security & Infosec by Jerry Bell and Andrew Kalat

Defensive Security Podcast - Malware, Hacking, Cyber Security & Infosec

372 Listeners

LINUX Unplugged by Jupiter Broadcasting

LINUX Unplugged

268 Listeners

SANS Internet Stormcenter Daily Cyber Security Podcast (Stormcast) by Johannes B. Ullrich

SANS Internet Stormcenter Daily Cyber Security Podcast (Stormcast)

651 Listeners

Curious Cases by BBC Radio 4

Curious Cases

820 Listeners

The Strong Towns Podcast by Strong Towns

The Strong Towns Podcast

422 Listeners

Late Night Linux by The Late Night Linux Family

Late Night Linux

164 Listeners

Darknet Diaries by Jack Rhysider

Darknet Diaries

8,061 Listeners

Cybersecurity Today by Jim Love

Cybersecurity Today

179 Listeners

CISO Series Podcast by David Spark, Mike Johnson, and Andy Ellis

CISO Series Podcast

189 Listeners

TechCrunch Daily Crunch by TechCrunch

TechCrunch Daily Crunch

42 Listeners

Strict Scrutiny by Crooked Media

Strict Scrutiny

5,794 Listeners

2.5 Admins by The Late Night Linux Family

2.5 Admins

98 Listeners

Cyber Security Headlines by CISO Series

Cyber Security Headlines

139 Listeners

What the Hack? by DeleteMe

What the Hack?

228 Listeners