Main Page

From CleanPosts

Jump to: navigation, search


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.

= 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;; 
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' {} \;


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


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


Strip blank lines from a text file

awk 'NF > 0' yeshua > yeshua2

Make all filenames in a directory lowercase

for x in `ls` 
if [ ! -f $x ]; then 
lc=`echo $x | tr '[A-Z]' '[a-z]'` 
if [ $lc != $x ]; then 
mv -i $x $lc 

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


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


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


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


for WORD in `cat FILE`
echo $WORD

Strip carriage returns from a DOS file

tr -d '\015' <INFILE >OUTFILE

Downshift all file names

for x in `ls`
if [ ! -f $x ]; then
lc=`echo $x  | tr '[A-Z]' '[a-z]'`
if [ $lc != $x ]; then
mv -i $x $lc

Rename in bulk



for F in $OLD*


SUFFIX=`expr $F : '$OLD\(.*\)'`



Install from tarball

tar -zxvf ARCHIVE.TAR.GZ


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

echo "$1" | tr '[A-Za-z]' '[N-ZA-Mn-za-m]'

Download streaming videos and convert them to MP3s

sudo curl -L -o /usr/local/bin/youtube-dl

sudo chmod a+x /usr/local/bin/youtube-dl

youtube-dl --title --extract-audio --audio-format mp3

Convert decimal to 16 bit binary and trim leading zeros

#! /bin/bash
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}'



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.


Fm To Title Summary
DAA DZZ TC-B'nei Elohim
DAA DZZ TC-Council
DAA DZZ TC-Interlude
DAA DZZ TC-Elamites
DAA DZZ Glossary-D People, places, and things.




Fm To Title Summary
GAA GCE Kuwapi Wanica receives the Golden Gift
GDA GEY Lange Pastor Lange leads a schism of the Dunkers
GYY GZZ Glossary-G People, places, and things.

Personal tools
Strangers In Paradise