Categories
Command Line

Log terminal commands and output

Script Method

Start

script screen.log

End

exit

Alternate method

[COMMAND] > output.txt

Appending to previous data

[COMMAND] >> output.txt
Categories
Command Line

Diff terminal command basic

Usage

diff file1.doc file2.doc

List of lines added

diff --changed-group-format='%>' --unchanged-group-format='' file1.doc file2.doc
diff -u file1.rsc file2.rsc | grep -E "^\+"

List of lines removed

diff --changed-group-format='%<' --unchanged-group-format='' file1.doc file2.doc
diff -u file1.rsc file2.rsc | grep -E "^\-"
Categories
Linux

Get Recently installed softwares in Debian

Via command line

cat /var/log/dpkg.log.1 | grep "install"

Categories
Command Line

Basic Linux Dig commands

# dig google.com
# dig google.com +short

MX Record

# dig google.com MX

SOA Record for Domain

# dig google.com SOA

TTL

# dig google.com TTL

Get only Answers

# dig google.com +nocomments +noquestion +noauthority +noadditional +nostats

Get all DNS Records Types

# dig google.com ANY +noall +answer

DNS Reverse Look-up

dig -x 216.58.206.110 +short

Multiple DNS Records

# dig yahoo.com mx +noall +answer redhat.com ns +noall +answer

Create $HOME/.digrc to configure