Main Page
From CleanPosts
Linux Jedi Mind Tricks
- Linux Novice - Someone who wonders what RTFM means.
- Linux User - Someone who has tried to RTFM.
- Windows User - Someone who has never heard RTFM.
- Linux Guru - Someone who doesn't need to RTFM.
- Linux Hacker - Someone who knows what isn't in TFM.
- Linux Jedi - The one who WTFM.
Count processes running as each user:
ps -ef | awk '{print$1}' | sort | uniq -c | sort -nr
Convert GIFs from Twitter that download as MP4s back into uploadable GIFs again
ffmpeg -y -i input.mp4 -filter_complex "scale=320:-1:flags=lanczos[x];[x]split[x1][x2]; [x1]palettegen[p];[x2][p]paletteuse" output.gif
Burn an iso to CD-ROM
wodim -eject -tao speed=0 dev=/dev/sr0 -v -data bmp1.iso
Build an iso image (bmp1.iso) from the contents in a folder (temp)
genisoimage -r -o bmp1.iso temp
Make ISO from temp directory
genisoimage -r -joliet-long -o files1.iso temp
Burn ISO to disk
wodim -eject -tao speed=0 dev=/dev/sr0 -v -data files1.iso
Add line numbers to a file (5 digits, leading zeros, separated by a colon)
nl -i1 -s': ' -nrz -w5 twit3.txt >twit4.txt
Copy command-line output to clipboard
cat spock2.txt | xclip -selection clipboard
Generate a pdf from a man page
man -t vim | ps2pdf - > vim.pdf
Append an asterisk prefix to every line in a file
sed -ne 's/.*/* &/p' enterprise.txt > enterprise2.txt
Rename all files with extension .OUT with the extension .txt
rename 's/\.OUT$/.txt/' *
Extract gzip compressed tar archives
gunzip progs.tar.gz tar xvf progs.tar
Tally up a column of figures
#! /bin/sh case "$1" in [1-9]*) colnum="$1"; shift;; *) echo "Usage: `basename $0` colnum [files]" 1>&2; exit 1;; esac awk '{sum += $col} END {print sum}' col=$colnum OFMT='%.2f' ${1+"$@"}
Convert a photo into an ASCII art representation directly into the terminal and save it to photo.ascii at the same time
jp2a Photo.jpg | tee photo.ascii
Change double-spaces in a text file to single spaces
cat redpine.txt | sed 's/ \+/ /g' > redpine2.txt
Delete empty files in and under the current directory
find . -empty -exec rm -f {} \;
Run the last command again as root
sudo !!
Make the text in a file all uppercase
cat testa.txt | tr '[a-z]' '[A-Z]' > testb.txt
Replace spaces in the filename of all the files in a directory with hyphens
find . -name "* *mp3" -exec rename 's/\ /-/g' {} \;
Michael-Neil-&-Graham-Getty---Retrochet-II---01---Cascade-Effect-Part-1.mp3
Convert all your files saved as "*.jpg-large" back to "*.jpg"
(so Twitter thinks they are images again)
find . -depth -name "*.jpg-large" -exec sh -c 'f="{}"; mv -- "$f" "${f%.jpg-large}.jpg"' \;
Find ten biggest hogs of disk space under a directory
du -s /usr/share/* | sort -nr | head
Prime factors of first 100 integers
echo {1..100} | factor
Make an image of a CD on your hard drive
dd if=/dev/sr0 of=image.iso
Mount that image on your system to use it
(The mount point must already exist)
mount -o loop image.iso /mnt/temp ===
Get a weather forecast for your city
curl wttr.in/seattle
Find files by name
find . -name *wav -print
Get information about all files of a certain type
find . -name *com -exec file {} \;
Print number of processes running as each user
$ ps -ef | awk '{print $1}' | sort | uniq -c
List the misspelled words in a file
enchant -l matthew
Return the name of the most-recently modified file in a directory
$ ls -t | head -1
20190506_061751k2.jpg
Strip blank lines from a text file
awk 'NF > 0' yeshua > yeshua2
Make all filenames in a directory lowercase
#!/bin/bash for x in `ls` do if [ ! -f $x ]; then continue fi lc=`echo $x | tr '[A-Z]' '[a-z]'` if [ $lc != $x ]; then mv -i $x $lc fi done
paste into file called lowerit chmod u+x lowerit ./lowerit
Combine two files, line by line, comma delimited
$ paste -d, names.txt distances.txt
Concatenate a group of files into a single new file
for file in *; do cat $file >> linuxgal.txt; done
Find man page for a command
whereis -m genisoimage
genisoimage: /usr/share/man/man1/genisoimage.1.gz
Build a list of unique words in a file
tr ' ' \\n < notes20191108.txt | sort | uniq
Build an iso from a file
genisoimage -r -joliet-long -o -win98tib.iso /home/teresita/Desktop/iso/win98[7]20150529.tib
Burn an iso to a CD-ROM
Make a new .iso image in /mnt/burn from the contents in /mnt/hold
mkisofs -o /mnt/burn/image.iso /mnt/hold
Burn that image to another CD
cdrecord dev=/dev/sr0 /mnt/burn/image.iso
Convert RPM package to DEB package
alien file.rpm
Copy a file
cp INFILE OUTFILE
Add a CD-ROM to your list of repositories.
apt-cdrom -m add
List only non-blank lines in a file
awk 'NF >0' file.txt
Create a custom command to list files
alias l = 'ls -l --color=auto'
Add line numbers to a file
cat -n file.txt
Find text in a file
awk 'chevy' cars.txt
Backup Master Boot Record
dd if=/dev/sda of=MBR.img bs=446 count=1
Make a file lowercase
cat FILE1.TXT | tr '[A-Z]' '[a-z]' > FILE2.TXT
Change the owner of a directory and all its contents
chown -R teresita DIRECTORY
Grab a copy of a website
wget -w9 -r --random-wait -l3 -np -E URL
Display time since boot
uptime
Get the sizes of all subdirectories under a directory
du -sh MYDIR
Display unique lines in a sorted file
uniq <FILE1 >FILE2
Use CUPS printer management system
localhost:631 (in a browser address bar)
MP3 to WAV conversion
madplay --output=wave:OCEANLAB.WAV OCEANLAB.MP3
Convert to OGG
oggenc *
Create a link
ln -s /initrd/mnt/dev_ro2 HOME
Extract tarball
tar -xvf /dev/hda/FILE
Make archive
tar -c DIRECTORY | bzip2 > DIR.TAR.BZ2
Make a file executable for all users
chmod u+x FILE
Turn a directory into a SquashFS file
mksquashfs /tmp/merge PUP_412.SFS
Mount your SquashFS file
mount -o loop -t squashfs PUP_412.SFS /mnt/pup
Upload a file to your webspace
wput MYFILE ftp://username:password@web.host.com
Convert a MIDI file to a .WAV file
timidity -Ow -oRUBY.WAV RUBY.MID
Replace spaces in a filename with hyphens
find . -name "* *mp3" -exec rename 's/\ /-/g' {} \;
Print the current month in Julian dates
cal -j
Make a new file of the individual words in another file
tr ' ' '\012' <INFILE >OUTFILE
or
for WORD in `cat FILE` do echo $WORD done
Strip carriage returns from a DOS file
tr -d '\015' <INFILE >OUTFILE
Downshift all file names
#!/bin/bash for x in `ls` do if [ ! -f $x ]; then continue fi lc=`echo $x | tr '[A-Z]' '[a-z]'` if [ $lc != $x ]; then mv -i $x $lc fi done
Rename in bulk
OLD=xxx
NEW=yyy
for F in $OLD*
do
SUFFIX=`expr $F : '$OLD\(.*\)'`
mv $OLD$SUFFIX $NEW$SUFFIX
done
Install from tarball
tar -zxvf ARCHIVE.TAR.GZ
./configure
Format floppy disk
fdformat /dev/sde
List directories
find . -type d -print
=== Convert avi to mpeg ===
mencoder MOVIE.AVI -of mpeg -mpegopts format=mpeg1:tsaf:muxrate=2000 -o MOVIE.MPG -oac lavc -lavcopts acodec=mp2:abitrate=224 -ovc lavc -lavcopts vcodec=mpeg1video:vbitrate=1152:keyint=15:mbd=2:aspect=4/3
Factorial function implemented by recursion.
define fact(n)
{
if (n <= 1) return (n);
return (n * fact(n-1));
}
Perform a ROT 13 conversion
#!/bin/sh echo "$1" | tr '[A-Za-z]' '[N-ZA-Mn-za-m]'
Download streaming videos and convert them to MP3s
sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
sudo chmod a+x /usr/local/bin/youtube-dl
youtube-dl --title --extract-audio --audio-format mp3 https://www.youtube.com/watch?v=L3FmBjX-p0I
Convert decimal to 16 bit binary and trim leading zeros
#! /bin/bash D2B=({0..1}{0..1}{0..1}{0..1}{0..1}{0..1}{0..1}{0..1}{0..1}{0..1}{0..1}{0..1}{0..1}{0..1}{0..1}{0..1}) echo $((10#${D2B[$1]}))
Send a man page to the terminal minus the embedded backspace characters
man genisoimage | col -b | less
Print the first sixteen binary numbers using awk to align the data
echo "obase=2;i=0;while(i<=15) {i;i+=1}" | bc | awk '{printf "%4s\n", $0}'
TERMINAL CRUISE
A
A0-Z9 20191025 20200123 20200124 20200125
Fm | To | Title | Summary |
---|---|---|---|
1 - Students | Chokhmah discovers sentient life on one of her rocky bodies | ||
2 - Michael | Chokhmah unites with a human to live among them | ||
3 - Patriarchs | Melchizedek establishes the knowledge of Chokhmah on Earth | ||
4 - Trial | Michael is arrested and put on trial for preaching infidelity to the Law of Keter | ||
5 - Tribes | The covenant people of Chokhmah flourish in Canaan | ||
6 - Knot | Salem is assailed by armies led by Zadkiel | ||
7 - Samaria | The northern tribes form a kingdom that flourishes for a time | ||
8 - Exile | The Fallen Angels leave Salem forever | ||
9 - Judah | Chokhmah brings Samarian colonists to Heaven while Judah is left behind | ||
10 - Truce | Lilith and Samael set the frontier between House Larund and House Gerash | ||
11 - Lael | Lael leads colonists from Judah to Heaven | ||
12 - Demonstroke | Lilith and Samael pay court to King Uriel of the House of Bellon | ||
13 - Judea | From the conquest of Nebuchadnezzar to the conquest of Pompey | ||
14 - Binah | The courtship of Keter and Chokhmah | ||
15 - Jashen | One of the B'nei Elohim is sent to retrieve the Golden Gift | ||
16 - Yohanan | Yeshua comes to Yohanan to be baptized | ||
17 - Ark | Lael's group defends the Ark from a group from the Saiph League who would seize it | ||
18 - Rumbek | Michael, Lilith, and Leliel come before King Metatron in Rumbek | ||
19 - Anshar | Yeshua and Belial have a brief encounter in the land of Anshar | ||
20 - Roshites | Gabriel and Remiel defend the Remnant from a force led by Belphegor | ||
21 - Arrival | The nobles attending the Council of Royals in Rumbek begin to arrive | ||
22 - Yeshua | Yeshua assumes leadership of Yohanan's group of disciples, and takes on more. |
D
Fm | To | Title | Summary |
---|---|---|---|
DAA | DZZ | TC-Council | The kingdoms of Heaven lay out their grievances |
DAA | DZZ | TC-Interlude | |
DAA | DZZ | TC-Risen | |
DAA | DZZ | TC-Elamites | |
DAA | DZZ | TC-Union | |
DAA | DZZ | TC-Way |
E
Fm | To | Title | Summary |
---|---|---|---|
EAA | EDH | E1 | . |
EEA | EHH | E2 | |
EIA | EEE | E3 | |
EEA | IEE | E4 | |
EAA | EEE | E5 | |
EAA | IEEE | E6 | |
EAA | EEE | E7 |
F
Fm | Fo | FitlF | FummarF |
---|---|---|---|
FAA | FDH | F1 | |
FFA | FHH | F2 | |
FIA | FFF | F3 | |
FFA | IFF | F4 | |
FAA | FFF | F5 | |
FAA | IFFF | F6 | |
FAA | FFF | F7 |
G
Fm | To | Title | Summary |
---|---|---|---|
GAA | GCE | Kuwapi | Wanica receives the Golden Gift |
GDA | GEY | Lange | Pastor Lange leads a schism of the Dunkers |
GFA | GHN | Nyduly | Shy Bear and Mark Lange meet Yeshua in Nyduly Wood |
GIA | GJW | Chief | The Kuwapi people have a change in leadership |
H
Fm | To | Title | Summary |
---|---|---|---|
HAA | HBX | Band | The earliest days of Kim, Sophie, Dory, and Gabriel |
HCA | HDJ | Attic | Pastor Lange leads a schism of the Dunkers |
HEA | HFQ | Clinic | Kim and Sofie are trapped in DECON quarantine |
HGA | HHC | Cartel | Gabriel escapes the draft |
HIA | HIU | Kaneko | Kim and Sophie plot to escape the internment camp |
HJA | HLA | Train | Kim and Sophie are rescued by Peter, Gabriel, and Dory |
HMA | HNS | Cable | Kim joins Yeshua on a side trip and is bifurcated |
I
Fm | To | Title | Summary |
---|---|---|---|
IAA | IDH | Kim | |
IEA | IHH | Felt | |
IIA | IJE | Porter | |
IKA | ILE | Search | |
IAA | IZZ | TC-Roswell | |
IAA | IZZ | TC-Greenrock | |
IAA | IZZ | TC-YomKippur |
J
Fm | To | Title | Summary |
---|---|---|---|
JAA | JDF | Judith | |
JEA | JHH | J2 | |
JIA | JJE | J3 | |
JKA | ILE | J4 | |
JAA | JZZ | J5 | |
JAA | IJZZ | J6 | |
JAA | JZZ | J7 |
K
Fm | To | Title | Summary |
---|---|---|---|
KAA | KBZ | Underground | The Red Wing migrates out of state. Robyn gives birth to Ariel. |
KEA | KHH | K2 | |
KIA | KKE | K3 | |
KKA | ILE | K4 | |
KAA | KZZ | K5 | |
KAA | IKZZ | K6 | |
KAA | KZZ | K7 |
L
Fm | To | Title | Summary |
---|---|---|---|
LAA | LAZ | David | David Morrich survives the nuclear attack on the American capital |
LBA | LBZ | Amanda | Dr. Amanda Chase joins DECON to research the B'nei Elohim |
LIA | LLE | Brains | Earl Roland and Ian Trochmann show Amanda evidence of White Brain Disease |
LLA | ILE | Checkup | Amanda meets Judith Gervasi |
LAA | LZZ | L5 | |
LAA | ILZZ | L6 | |
LAA | LZZ | L7 |
M
Fm | To | Title | Summary |
---|---|---|---|
MAA | MDH | M1 | |
MEA | MHH | M2 | |
MIA | MME | M3 | |
MMA | IME | M4 | |
MAA | MZZ | M5 | |
MAA | IMZZ | M6 | |
MAA | MZZ | M7 |
N
Fm | To | Title | Summary |
---|---|---|---|
NAA | NDH | N1 | |
NEA | NHH | N2 | |
NIA | NNE | N3 | |
NNA | INE | N4 | |
NAA | NZZ | N5 | |
NAA | INZZ | N6 | |
NAA | NZZ | N7 |
O
Fm | To | Title | Summary |
---|---|---|---|
OAA | ODH | O1 | |
OEA | OHH | O2 | |
OIA | OOE | O3 | |
OOA | IOE | O4 | |
OAA | OZZ | O5 | |
OAA | IOZZ | O6 | |
OAA | OZZ | O7 |
P
Fm | To | Title | Summary |
---|---|---|---|
PAA | PDH | P1 | |
PEA | PHH | P2 | |
PIA | PPE | P3 | |
PPA | IPE | P4 | |
PAA | PZZ | P5 | |
PAA | IPZZ | P6 | |
PAA | PZZ | P7 |
Q
Fm | To | Title | Summary |
---|---|---|---|
QAA | QDH | Q1 | |
QEA | QHH | Q2 | |
QIA | QQE | Q3 | |
QQA | IQE | Q4 | |
QAA | QZZ | Q5 | |
QAA | IQZZ | Q6 | |
QAA | QZZ | Q7 |
R
Fm | To | Title | Summary |
---|---|---|---|
RAA | RDH | R1 | |
REA | RHH | R2 | |
RIA | RRE | R3 | |
RRA | IRE | R4 | |
RAA | RZZ | R5 | |
RAA | IRZZ | R6 | |
RAA | RZZ | R7 |
S
Fm | To | Title | Summary |
---|---|---|---|
SAA | SDH | S1 | |
SEA | SHH | S2 | |
SIA | SSE | S3 | |
SSA | ISE | S4 | |
SAA | SZZ | S5 | |
SAA | ISZZ | S6 | |
SAA | SZZ | S7 |
T
Fm | To | Title | Tummary |
---|---|---|---|
TAA | TDH | T1 | |
TEA | THH | T2 | |
TIA | TTE | T3 | |
TTA | ITE | T4 | |
TAA | TZZ | T5 | |
TAA | ITZZ | T6 | |
TAA | TZZ | T7 |
U
Fm | Uo | Uitle | Uummary |
---|---|---|---|
UAA | UDH | U1 | |
UEA | UHH | U2 | |
UIA | UUE | U3 | |
UUA | IUE | U4 | |
UAA | UZZ | U5 | |
UAA | IUZZ | U6 | |
UAA | UZZ | U7 |
V
Fm | Vo | Vitle | Vummary |
---|---|---|---|
VAA | VDH | V1 | |
VEA | VHH | V2 | |
VIA | VVE | V3 | |
VVA | IVE | V4 | |
VAA | VZZ | V5 | |
VAA | IVZZ | V6 | |
VAA | VZZ | V7 |
W
Fm | Wo | Witle | Wummary |
---|---|---|---|
WAA | WDH | W1 | |
WEA | WHH | W2 | |
WIA | WWE | W3 | |
WWA | IWE | W4 | |
WAA | WZZ | W5 | |
WAA | IWZZ | W6 | |
WAA | WZZ | W7 |
X
Fm | Xo | Xitle | Xummary |
---|---|---|---|
XAA | XDH | X1 | |
XEA | XHH | X2 | |
XIA | XXE | X3 | |
XXA | IXE | X4 | |
XAA | XZZ | X5 | |
XAA | IXZZ | X6 | |
XAA | XZZ | X7 |
Y
Fm | Yo | Yitle | Yummary |
---|---|---|---|
YAA | YDH | Y1 | |
YEA | YHH | Y2 | |
YIA | YYE | Y3 | |
YYA | IYE | Y4 | |
YAA | YZZ | Y5 | |
YAA | IYZZ | Y6 | |
YAA | YZZ | Y7 |
Z
Fm | Zo | Zitle | ZummarZ |
---|---|---|---|
ZAA | ZDH | Z1 | |
ZEA | ZHH | Z2 | |
ZIA | ZZE | Z3 | |
ZZA | IZE | Z4 | |
ZAA | ZZZ | Z5 | |
ZAA | IZZZ | Z6 | |
ZAA | ZZZ | Z7 |