User:Barry

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.

Add a CD-ROM to your list of repositories
apt-cdrom -m add

Add line numbers to a file (5 digits, leading zeros, separated by a colon)
nl -i1 -s': ' -nrz -w5 twit3.txt >twit4.txt

Add line numbers to a file
cat -n file.txt

Prepend an asterisk to every line in a file
sed -ne 's/.*/* &/p' enterprise.txt > enterprise2.txt

Backup Master Boot Record
dd if=/dev/sda of=MBR.img bs=446 count=1

Batch convert all the avi files in a directory to mp4
(Assumes the files have no spaces in their names, but I have another script for that) for i in *.avi; do ffmpeg -i "$i" "${i%%.*}.mp4" done
 * 1) !/bin/bash

Build a list of items duplicated after the first field, sorted by number of instances
sort -k 2 all28.txt | uniq -f 1 -d -c | sort -n >dupes04.tx

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

Build an iso image from the contents in a folder
genisoimage -r -o bmp1.iso temp

Build a sorted list of files from the current directory in python
python -c 'import glob; dir = glob.glob("*"); dir.sort; print "\n".join((dir))'

Burn ISO to disk
wodim -eject -tao speed=0 dev=/dev/sr0 -v -data files1.iso

Change double-spaces in a text file to single spaces
cat redpine.txt | sed 's/ \+/ /g' > redpine2.txt

Change the owner of a directory and all its contents
chown -R teresita DIRECTORY

Combine two files, line by line, comma delimited
$ paste -d, names.txt distances.txt

Compile and install software old-school, from downloaded source code
tar -xvf joe-4.6.tar.gz cd joe* ./configure make sudo make install

Concatenate a group of files into a single new file
for file in *; do cat $file >> linuxgal.txt; done

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"' \;

Convert a MIDI file to a .WAV file
timidity -Ow -oRUBY.WAV RUBY.MID

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

Convert ASCII diagrams to graphics
ditaa stargrid.txt stargrid.png

Convert .avi video files to smaller .mp4 format
ffmpeg -i 'U2 - New Years Day.avi' 'U2 - New Years Day.mp4'

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

Convert man page to text file
man concalc | col -bx >concalc.txt

Convert RPM package to DEB package
alien file.rpm

Convert text files from MS-DOS format to UNIX format
tr -d '\r' mule.txt

Convert WordStar files to plain text
cat rubymae.ws | tr -c '[:print:]\t\r\n' '[ *]' >rubymae.txt

Copy a file
cp INFILE OUTFILE

Copy command-line output to clipboard
cat spock2.txt | xclip -selection clipboard

Count processes running as each user:
ps -ef | awk '{print$1}' | sort | uniq -c | sort -nr

Create a custom command to list files
alias l = 'ls -l --color=auto'

Create a directory using today's date
mkdir $(date +%Y%m%d)

Create a link
ln ''-s /initrd/mnt/dev_ro2 HOME

Delete empty files in and under the current directory
find. -empty -exec rm -f {} \;

Display all subdirectories in a tree format
ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\///g' -e 's/^//' -e 's/-/|/'

Display time since boot
uptime

Display unique lines in a sorted file
uniq ''FILE2

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

Extract audio from any video file
ffmpeg -i Pet-Shop-Boys---West-End-Girls.mp4 -vn west-end-girls.ogg

Extract gzip compressed tar archives
gunzip progs.tar.gz tar xvf progs.tar

Extract pages from a PDF to build a new PDF
ps2pdf -dFirstPage=4 -dLastPage=8 input.pdf output.pdf

Extract tarball
tar -xvf /dev/hda/FILE

Factorial function implemented by recursion.
define fact(n) { if (n <= 1) return (n); return (n * fact(n-1)); }

Factorial function in python
python -c 'import math; print(math.factorial(52))'

Find all the unique four-letter words in a text file
cat love.txt | perl -ne 'print map("$_\n", m/\w+/g);' | tr A-Z a-z | sort | uniq | awk 'length($1) == 4 {print}'

Find duplicates on your filesystem
duff -r *

Find files by name
find. -name *wav -print

Find man page for a command
whereis -m genisoimage genisoimage: /usr/share/man/man1/genisoimage.1.gz

Find ten biggest hogs of disk space under a directory
du -s /usr/share/* | sort -nr | head

Find text in a file
awk 'chevy' cars.txt

Format floppy disk
fdformat /dev/sde

Generate a pdf from a man page
man -t vim | ps2pdf - > vim.pdf

Generate a random password
openssl rand -base64 12

FRYSkfIikVA7AuNm

openssl rand -base64 24

l8Ht0b83wCAnH95izexZStOW73IqH/Mz

Get a one-line description for all the files in a directory, delete lines that have no description
ls -l /usr/bin | awk '{print $9}' | xargs whatis | sed '/appropriate/d'

Get a weather forecast for your city
curl wttr.in/seattle

Get information about all files of a certain type
find. -name *com -exec file {} \;

Get the sizes of all subdirectories under a directory
du -sh MYDIR

Get your public IP address
curl ifconfig.me; echo

Grab a copy of a website
wget ''-w9 -r --random-wait -l3 -np -E URL

List actual files referenced by library symbolic links
sudo ls -lR /lib | grep ^l | awk '{print $9" "$10" "$11}' | grep ^lib | sort

List all mp3 files and tally total size
find / -name '*.mp3' -ls | awk '{s+=$7;f+=1}END{print " MP3 files: "f"\nTotal size: "s/1000000" MB"}'

List all processes by owner, sort on PID
ps -ef | awk '{print $1 "   \t" $2 "\t" $8}' | sort -nk 2

List directories
find. -type d -print

List only non-blank lines in a file
awk 'NF >0' file.txt

List the misspelled words in a file
enchant -l matthew

Make a file executable for all users
chmod u+x FILE

Make a file lowercase
cat FILE1.TXT | tr '[A-Z]' '[a-z]' > FILE2.TXT

Make a new .iso image in /mnt/burn from the contents in /mnt/hold
mkisofs -o /mnt/burn/image.iso /mnt/hold

Make an image of a CD on your hard drive
dd if=/dev/sr0 of=image.iso

Make archive
tar -c DIRECTORY | bzip2 > DIR.TAR.BZ2

Make directories for 36 months using brace expansion:
mkdir {2021..2023}-{01..12}

Make ISO from temp directory
genisoimage -r -joliet-long -o files1.iso temp

Make the ls command print in a tree format
alias tree="ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^//' -e 's/-/|/'"

Make the ls command useful for a change
alias ls='ls -lhGpt --color=always'

Make the text in a file all uppercase
cat testa.txt | tr '[a-z]' '[A-Z]' > testb.txt

Mount that image on your system to use it
(The mount point must already exist) mount -o loop image.iso /mnt/temp

Mount your SquashFS file
mount -o loop -t squashfs PUP_412.SFS /mnt/pup

Move all files starting with "B" into the b subdirectory
find -name "B*.*" -exec mv {} b \;

Move all the .jpg images from one folder to another folder, recursively
find www.cleanposts.com -type f -name *.jpg -exec mv '{}' /home/teresita/Downloads \;

MP3 to WAV conversion
madplay ''--output=wave:OCEANLAB.WAV OCEANLAB.MP3

Prime factors of first 100 integers
echo {1..100} | factor

Print a complete date-time group
date '+%Y-%m-%d/%k:%M:%S'

Print all lines with exactly 40 characters
awk 'length ==40' tags.tx3

Print all prime numbers between 1 and 5000
seq 1 5000 | factor | awk 'NF==2 { print $2 }' | tr '\n' ',';echo

Print a random line from a file of unknown length
awk 'BEGIN{ srand }; rand * NR < 1 { line = $0} END {print line}' tags.tx3

Print a short list of your most recently-used commands
fc -rl | awk '{print $1=""; print}'

Print lines with only four letter words (or less)
awk 'length < 5' tags.tx3

Print number of processes running as each user
$ ps -ef | awk '{print $1}' | sort | uniq -c

Print the current month in Julian dates
cal -j

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}'

Print the lines of file2 that are missing in file1
grep -vxFf file1.txt file2.txt

Print the squares and cubes of the integers from 0 to 10
python -c 'print([i**2 for i in range(11)]);print([i**3 for i in range(11)])'

Print the unique commands in your history by removing duplicate lines in place without an alphabetical sort
history | awk '{$1="";print}' | awk '!a[$0]++'

or:

history | awk '{$1=""} !a[$0]++'

Print your command history, omitting duplicates
history | awk '{$1="";print }' | sort | uniq

Print your top fifteen most frequently-used commands:
history | awk '{print $2}' | sort | uniq -c | sort -n | tail -n15 | sort -nr

Recursively move mp3 files in many directories to a single target directory
find -name '*.mp3' -exec mv -i {} /home/minix/Desktop/music \;

Remove tags from HTML file
sed -e :a -e 's/<[^<]*>/ /g;/</{N;s/\n/ /;ba;}' CleanPosts.html

Rename all files with extension .OUT with the extension .txt
rename 's/\.OUT$/.txt/' *

Replace spaces in a filename with hyphens
find. -name "* *mp3" -exec rename 's/\ /-/g' {} \;

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

Return the name of the most-recently modified file in a directory
$ ls -t | head -1

Run the last command again as root
sudo !!

Send a man page to the terminal minus the embedded backspace characters
man genisoimage | col -b | less

Shuffle, deal 4 hands
python -c "num=['A', '2', '3', '4', '5', '6', '7', '8', '9', '10', 'J', 'Q', 'K']*4; suit=['h','d','c','s']*13; card=[x+y for x,y in zip(num, suit)]; import random as r; r.shuffle(card); print card[1:6];print card[7:12];print card[13:18];print card[18:23]"

Strip blank lines from a text file
awk 'NF > 0' yeshua > yeshua2

Strip carriage returns from a DOS file
tr -d '\015' OUTFILE

Tally up a column of figures
awk '{s+=$1} END {print s}' figures.txt

Trump voter Twitter account name generator
python -c 'import random; print("TrumpBot"+str(random.randint(0,1000000-1)))'

Turn a directory into a SquashFS file
mksquashfs /tmp/merge PUP_412.SFS

Turn the capslock key into a second ESC key
setxkbmap -option caps:escape

Upload a file to your webspace
wput MYFILE ftp://username:password@web.host.com

Use awk and the command-line factor program to print prime numbers
echo {1..80} | factor | awk 'NF==2 { print $2 }'

Use imagemagick to take a screen shot
import screenshot.jpg

Use CUPS printer management system
localhost:631 (in a browser address bar)

Use the command line as a quick calculator
echo $((145+5)) echo $((145-5)) echo $((145*5)) echo $((145/5)) echo $((145%5)) echo $((145**5))

Use Vorbis Tools to convert a .WAV file to .ogg format
oggenc synthony.wav

View a text file with line numbers added
grep -n ^ countzero.txt | less

Your top 25 commands
history | awk '{print $2}' | sort | uniq -c | sort -nr | head -25

Calculate days between two dates (accounts for leap years)
import sys from datetime import date y1=int(sys.argv[1]) m1=int(sys.argv[2]) d1=int(sys.argv[3]) y2=int(sys.argv[4]) m2=int(sys.argv[5]) d2=int(sys.argv[6]) x = date(y1,m1,d1) y = date(y2,m2,d2) z = y - x print (z.days)
 * 1) !/usr/bin/python

Calculate the convergent factorial series ∑1/𝑛! = 1/1! + 1/2! + 1/3!+...
import sys import math n = 1 for x in range (1, int(sys.argv[1])): n = n + (1 / float(math.factorial(x))) print (n)
 * 1) !/usr/bin/python

Calculate the factors of a number in Python
import sys n=int(sys.argv[1]) factors = [] for i in range(1,n+1): if n%i == 0: factors.append(i) print (factors)
 * 1) !/usr/bin/python

Convert between numerical bases
printf "hex2dec=";echo "ibase=16;$1"|bc printf "dec2hex=";echo "obase=16;$1"|bc printf "oct2dec=";echo "ibase=8;$1"|bc printf "dec2oct=";echo "obase=8;$1"|bc
 * 1) !/bin/bash

Convert decimal to 16 bit binary and trim leading zeros
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]}))
 * 1) ! /bin/bash

Convert temperatures
c=$(echo "scale=1;($1-32)*(5/9)" | bc -l) f=$(echo "scale=1;($1*(9/5))+32" | bc -l) echo -e "\n\e[1;30m=$c C & $f F\e[0m\n"
 * 1) !/bin/bash

Downshift all file names
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
 * 1) !/bin/bash

Find the limit, as x approaches 0, of f(x) = tan x / x
import math import numpy as np for x in np.arange(1.0, 0, -0.01): print((math.tan(x))/x)
 * 1) !/usr/bin/python2.7

List primes between 2 and any number
for (( i=2; i<=$1; i++ ));do l=$(factor $i | cut -d : -f 1) r=$(factor $i | cut -d : -f 2 | sed 's/ //g') if (( $l == $r ));then echo $i fi done
 * 1) !/bin/bash

Make all filenames in a directory lowercase
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
 * 1) !/bin/bash

paste into file called lowerit chmod u+x lowerit ./lowerit

Make a new file of the individual words in another file
tr ' ' '\012' OUTFILE''

or

for WORD in `cat FILE` do echo $WORD done

Python script to convert polar coordinates (right ascension, declination) to Cartesian coordinates (x,y,z)
import math import sys rah=float(sys.argv[1]) ram=float(sys.argv[2]) ras=float(sys.argv[3]) ded=float(sys.argv[4]) dem=float(sys.argv[5]) des=float(sys.argv[6]) dis=float(sys.argv[7]) alpha=rah*15+ram/4+ras/240 delta=ded+dem/60+des/3600 alpharad=math.radians(alpha) deltarad=math.radians(delta) x=dis*math.cos(deltarad)*math.cos(alpharad) y=dis*math.cos(deltarad)*math.sin(alpharad) z=dis*math.sin(deltarad) print 'x =',x,'y =',y,'z =',z
 * 1) !/usr/bin/python

Perform a ROT 13 conversion
echo "$1" | tr '[A-Za-z]' '[N-ZA-Mn-za-m]'
 * 1) !/bin/sh

Rename in bulk
OLD=xxx NEW=yyy for F in $OLD* do SUFFIX=`expr $F : '$OLD\(.*\)'` mv $OLD$SUFFIX $NEW$SUFFIX done

Return pi to the number of digits specified on the command line
(Answer grows more accurate the longer the fractional part)

echo "scale=$1;a(1)*4" | bc -l
 * 1) !/bin/bash

Return slope-intercept form of the equation of a line through two points
import sys x1=float(sys.argv[1]) y1=float(sys.argv[2]) x2=float(sys.argv[3]) y2=float(sys.argv[4]) m = (y2-y1)/(x2-x1) b = y1 / (m * x1) print 'y =',m,'x +',b
 * 1) !/usr/bin/python

or

from sys import argv x1, y1, x2, y2 = [float(f) for f in argv[1:]] m = (y2 - y1) / (x2 - x1) b = y1 / (m * x1) print(f"y = {m} x + {b}")

Tally up a column of figures
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+"$@"}
 * 1) ! /bin/sh

Use Heron's formula to obtain the area of any triangle with known side lengths
import math import sys a=float(sys.argv[1]) b=float(sys.argv[2]) c=float(sys.argv[3]) s = (a + b + c) / 2 print (math.sqrt(s * (s - a) * (s - b) * (s - c)))
 * 1) !/usr/bin/python

Use Python to calculate the date of Easter for any year
import datetime import sys y = int(sys.argv[1]) g = y % 19 e = 0 c = y/100 h = (c-c/4-(8*c+13)/25+19*g+15)%30 i = h-(h/28)*(1-(h/28)*(29/(h+1))*((21-g)/11)) j = (y+y/4+i+2-c+c/4)%7 p = i-j+e d = 1+(p+27+(p+6)/40)%31 m = 3+(p+26)/30 print datetime.date(y,m,d)
 * 1) !/usr/bin/python

Use the complete elliptic integral of the 2nd kind to calculate the perimeter of an orbit
import sys from scipy.special import ellipe a=float(sys.argv[1]) b=float(sys.argv[2]) e = 1.0 - b**2 / a**2 print (4 * a * ellipe(e))
 * 1) !/usr/bin/python2.7

History

 * apt-cache search midnight
 * apt-cache search mp4 codec
 * apt-cache search pdf
 * apt-cache search pdf convert
 * apt-cache search pdf convert text
 * apt-cache search pdf viewer
 * apt-cache search prename
 * apt-get install lynx
 * apt-get remove -f evolution
 * apt-get remove -y youtube-dl
 * apt install curl
 * apt install ffmpeg
 * apt install gprename
 * apt install imagemagick
 * apt install irssi
 * apt install kolourpaint4
 * apt install lynx
 * apt install mc
 * apt install mplayer
 * apt install mupdf
 * apt install mupdf-tools
 * apt install par
 * apt install pip
 * apt install python
 * apt install python3
 * apt install python-pip
 * apt install rename
 * apt install sc
 * apt install sox
 * apt install streamripper
 * apt install ubuntu-restricted-extras
 * apt install wodim
 * apt install xclip
 * apt install youtube-dl
 * apt purge snapd
 * apt update
 * bc
 * bc 'define fibonacci(n) {if((n==1)||(n==0)) {return(n);} else {return(fibonacci(n-1)+fibonacci(n-2));}};scale=10;fibonacci(20) / fibonacci(19)'
 * bc -l
 * cal
 * cal 2021
 * cat 131 | head -n 10 | grep 'cntrl:'
 * cat 131 | head -n 10 | grep 'print:'
 * cat all12a.txt
 * cat chiefyeshua.txt | xclip -selection clipboard
 * cat cli.txt
 * cat *.html >>all.html
 * cat *.html >>cli.html
 * cd ,,
 * cd ..
 * cd Af*
 * cd AF*
 * cd cli
 * cd Desktop
 * cd Downloads
 * cd home
 * cd /home
 * cd /home\
 * cd html
 * cd M14
 * cd M16
 * cd /media
 * cd minix
 * cd minix
 * cd minuix
 * cd music
 * cd pdf
 * cd sheets
 * cd /var/lib/dpkg
 * cd vim
 * chmod a+rx /usr/local/bin/youtube-dl
 * chmod rename.py
 * chmod u+x rename.py
 * chown -R minix *
 * chown -R minix /media/minix/AF79-784B/*
 * chown -R minux *
 * clear
 * curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl
 * date -d "1970-01-01 1607048304 sec GMT"
 * date '%s'
 * date '+%s'
 * date %s
 * def -h
 * df
 * df -f
 * dff -h
 * df -g
 * df -h
 * df -h
 * df -j
 * dpkg -i deb-multimedia-keyring_2016.8.1_all.deb
 * du
 * du *
 * du -h
 * du -h
 * echo $RANDOM
 * eject
 * eject /dev/sda1
 * fc -rl | awk '{print $1=""; print}'
 * ffmpeg -y -i input.mp4 -filter_complex "scale=320:-1:flags=lanczos[x];[x]split[x1][x2]; [x1]palettegen[p];[x2][p]paletteuse" duck.gif
 * files -name evolution*
 * files * -name evolution*
 * find
 * find . -depth -name "*.jpg-large" -exec sh -c 'f="{}"; mv -- "$f" "${f%.jpg-large}.jpg"' \;
 * find evol*
 * find evolution*
 * find --help
 * find . -name *
 * find -name '*' -exec mv {} '/home/minix/Desktop/M14' \;
 * find -name '*' -exec mv {} '/home/minix/Desktop/music' \;
 * find -name '*' -exec mv -i {} '/home/minix/Desktop/M14' \;
 * find -name "*.mp3"
 * find -name *.mp3
 * find -name '*.mp3'
 * find . -name *.mp3
 * find . -name *.mp3
 * find -name '*.mp3' -exec mv {} /home/minix/Desktop/music
 * find -name '*.mp3' -exec mv -i {} /home/minix/Desktop/music \;
 * find -name '*.mp3' | -exec mv -i {} /media/minix/AF79-784B \;
 * find -name '*.mp3' -exec mv -i {} /media/minix/AF79-784B \;
 * find . -name *.mp3 -r
 * find . -name *.mp3 -R
 * find -name '*.mp3' | xargs -0 -I files mv /home/minix/Desktop/music
 * find -name '*.mp3' | xargs -0 -I files mv /home/minix/Desktop/music {}
 * find -name '*.mp3' | xargs -0 -I files mv /media/minix/AF79-784B {}
 * find -name '*.mp3' | xargs -0 -I mv /media/minix/AF79-784B
 * find -name '*.mp3' | xargs -I files mv /home/minix/Desktop/music
 * find . -name music-usb.pdf
 * find -name '*.ogg' -exec mv -i {} /home/minix/Desktop/music \;
 * find . -name "*.tx0" -exec ls -l {} \;
 * find . -name "*.tx0" -exec tr '[\000-\011\013-\037\177-\377]' ';' {} \;
 * find . -r -name *.mp3
 * find . -R -name *.mp3
 * find -type f -name "*.mp3"
 * find -type f -name "*.mp3" | rename 'y/A-Z/a-z/'
 * find -type f -name "*.mp3" | rename 'y/A-Z/a-z/' -f
 * fsck -f
 * fsck -f /dev/sda1
 * fsck -f --help
 * fsck -fV
 * fsck --help
 * genisoimage -r -joliet-long -o buri3.iso hold
 * gprename
 * grep smartre tags.tx3
 * hash -r
 * history
 * history > history.txt
 * history | sort | uniq
 * htop
 * import -window root screenshot.jpg
 * kill -9 30925
 * locate evolution*
 * login
 * ls
 * ls\
 * ls -1
 * ls all.*
 * ls all.html
 * ls *Charly*
 * ls *CLI*
 * ls klaus
 * ls -l
 * ls -l *all*
 * ls -l all*
 * ls -l all.html
 * ls *listing*
 * ls -l -R evolution*
 * ls /media/minix/M28
 * lsof /var/lib/dpkg/lock
 * ls *.py
 * ls *Tut*
 * ls *Tuto*
 * lsw
 * lynx www.bing.com
 * man mupdf-tools
 * mc
 * mkdir Charly
 * mkdir cli
 * mkdir klaus
 * mkdir moments{1..99}
 * mkdir neets[10..24]
 * mkdir Tutorial
 * mount
 * mupdf-tools --help
 * mv *Charly* Charly
 * mv *charly*.html Charly
 * mv *CLI* cli
 * mv --help
 * mv *Klaus*.html klaus
 * mv * /media/minix/AF79-784B
 * mv *Tuto*.html Tutorial
 * nautilus
 * passwd
 * passwd root
 * pip
 * pip install --upgrade youtube_dl
 * ps aux | grep -i apt
 * pushd
 * python
 * python3
 * reboot
 * rename -f 's/A/a/g' *
 * rename -f 's/--/-/g' *
 * rename -f 's/^Z/z/g' *
 * rename -f 's/Z/z/g' *
 * rename -n -f 's/A/a/g' *
 * rename -n 's/\.\.\.//' *
 * rename -n 's/A/a/g' *
 * rename -n 's/\ /-/g' *
 * rename -n 's/\'//g' *
 * rename -n "s/\'//g" *
 * rename -n 's/$/.tx0/' *
 * rename -n 's/\.$/.tx0/' *
 * ./rename.py
 * rename 's/A/a/' -f
 * rename 's/A/a/g' -f
 * rename 's/\ /-/g' *
 * rename "s/\!//g" *
 * rename "s/\'//g" *
 * rename "s/\(//g" *
 * rename "s/\)//g" *
 * rename "s/\)//g" -f *
 * rename "s/\&//g" -f *
 * rename 's/$/.tx0/' *
 * rename *.* .tx0 *
 * rename 'y/A-Z/a-z/' *
 * rename 'y/A-Z/a-z/' -f *
 * rename 'y/A-Z/a-z/' -n *
 * rename 'y/A-Z/a-z/' -n -f *
 * rm all.*
 * rm -d
 * rm -d *
 * rm -help
 * rm --help
 * rm *.html
 * rm lock
 * rm lock-frontend
 * ;s
 * sed -e :a -e 's/<[^<]*>/ /g;/all.txt
 * sed -e :a -e 's/<[^<]*>/ /g;/cli.txt
 * sed -e :a -e 's/<[^<]*>/ /g;/cli.txt
 * sed -e :a -e 's/<[^<]*>/ /g;/</{N;s/\n/ /;ba;}' t.html
 * setxkbmap -option caps:escape
 * setxkbmap -option caps:swapescape
 * sleep 10; import -window root screenshot-irssi-firefox.jpg
 * sleep 10; import -window root screenshot.jpg
 * snap list
 * sudo apt install lynx
 * sudo mc
 * sudo su
 * timedatectl set-timezone America/Los_Angeles
 * timedatectl set-timezone America/Seattle
 * timedatectl set-timezone Canada/Vancouver
 * top
 * tr '[\000-\011\013-\037\177-\377]' '' 131.txt
 * umount /dev/sda
 * umount /dev/sda1
 * umount /dev/sda2
 * umount /dev/sda3
 * umount /dev/sda4
 * umount /dev/sdb1
 * umount /dev/sr0
 * uniq -f 1 -d -c all12a.txt
 * uniq -f 1 -d -c all12a.txt | sort -n
 * uniq -f 1 -d -c all12a.txt | sort -nr
 * uniq -f 1 -d -c all12a.txt | sort -nr
 * uniq -f 1 -d -c all12a.txt | sort -nr >all12b.txt
 * uniq -f 1 -d -c all12a.txt | sort -nr >all12b.txtclear
 * uniq -f 1 -d -c all12a.txt | sort -r
 * unrar x 'Wind Of Buri - Moments Of Life 099.part01.rar'
 * vi all03.txt
 * vi all10.txt
 * vi all12b.txt
 * vi all13.txt
 * vi all.txt
 * vi cli.txt
 * vi LMall.txt
 * vim strip
 * wc yohanan.tx6
 * wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl
 * wget http://www.deb-multimedia.org/pool/main/d/deb-multimedia-keyring/deb-multimedia-keyring_2016.8.1_all.deb
 * wodim -eject -tao speed=0 dev=/dev/sr0 -v -data buri11.iso
 * xclip
 * youtube-dl -U


 * Bash20200208

-
 * PS1="-\n\u@\W:"
 * streamripper http://95.217.39.141:9125 -u 'WinAmpMPEG/5.0'
 * find -name '*.mp3' -exec mv -i {} /home/minix/Desktop/music \;
 * ffmpeg -i 1205201058.mp4 -vf scale=1280:-1 -crf 30 -preset veryslow smaller.mp4 # Reduce the resolution (preserving aspect ratio) and quality of a video from your phone to save space. In my case from 240MB to 7MB. It took about 4 minutes to process though.
 * Add an overlay.png (here: the mask) to a movie (in.mp4):
 * 1) 1⃣ ffmpeg -i in.mp4 %04d.split.png
 * 2) 2⃣ for i in *.split.png; do composite -gravity center overlay.png $i $i.png;done
 * 3) 3⃣ ffmpeg -pattern_type glob -i '*.png.png' -c:v libx264 -r 25 -pix_fmt yuv420p "out.mp4"

Sidebar