This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# apt-mark - mark/unmark a package as bing automatically-installed | |
apt-mark showauto |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-mark showmanual > filename | |
# NOTE: history.log does not capture the entire list of | |
# manually installed packages. To get the full list, | |
# use the command above. The below is retained for | |
# history. | |
# | |
## sed - stream editor for filtering and transforming text | |
## -n suppress automatic printing of pattern space | |
## awk - pattern ascanning and text processing language |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# cat - concatenate files and print on the standard output | |
# xargs - build and execute command lines from standard inpout | |
# dpkg-query - a tool to query the dpkg database | |
# -W list packages matching given pattern, output can be customized | |
# -f specifies the format of the output of -W | |
cat filename | xargs dpkg-query -W -f='${binary:Package}\n\t${binary:Summary}\n' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sed - stream editor for filtering and transforming text | |
# -n suppress automatic printing of pattern space | |
# cut - remove sections from each line of files | |
# -f select only these fields | |
# -d use DELIM instead of TAB for field delimiter | |
# awk - pattern scanning and text processing language | |
sed -n '/Setting up/p' /var/log/bootstrap.log | cut -f3 -d' ' | awk '!arr[$0]++' > filename |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# dpkg - package manager for Debian | |
# -V Verifies the integrity of package-name or all packages if omitted | |
# | |
# The output format: | |
# | |
# SM5DLUGT c <file> | |
# | |
# Where: | |
# S is the file size. | |
# M is the file's mode. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# awk - pattern scanning and text processing language | |
# a) When the program is omitted, the default is { print $0 } | |
# b) Each line of filename is read by awk, one at a time. | |
# c) The line, or record, is stored into the field variable $0. | |
# d) If an array index consisting of the line is not (!) present | |
# in the array, then the line is printed. | |
# e) The array is incremented (current index added to the array). | |
awk '!array[$0]++' filename > filename2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This does not work for packages not installed. '$(which COMMAND)' | |
# may be replaced with any /path/file. Replace COMMAND with binary | |
# of interest. | |
# | |
# dpkg - package manager for Debian | |
# -S Search for a filename from installed packages | |
# which - locate a command | |
# awk - process output of previous command | |
# gsub(r,s,[t]) - global subsitution, every match of regular expression | |
# r in variable t is replaced by string s. If t is omitted, $0 is used. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# modify directory1/ and directory2/ paths as appropriate | |
# | |
# diff - compare files line by line | |
# -s report when two files are the same | |
# -r recursively compare any subdirectories found | |
# sed - stream editor for filtering and transforming text | |
# -n suppress automatic printing of pattern space | |
# cut - remove sections from each line of files | |
# -f select only these fields | |
# -d use DELIM instead of TAB for field delimiter |
NewerOlder