# moves everything from .JPG to .jpg
file in *.JPG ; do mv $file `echo $file | sed ‘s/\(.*\.\)JPG/\1jpg/’` ; done
m4a to mp3
#!/bin/bash
for i in *.m4a
do
faad “$i”
x=`echo “$i”|sed -e ‘s/.m4a/.wav/’`
y=`echo “$i”|sed -e ‘s/.m4a/.mp3/’`
lame -h -b 192 “$x” “$y”
rm “$x”
find word in directory of files
# find /start/dir -exec grep -q my_search_word {} \; -print
recursive find and replace in filename
the example given here is for file extensions:
# find -iname “*fileExtension” -exec sed -i ‘s/search/replace/’ {} \;
example:
# find -iname “*html” -exec sed -i ‘s/shtml/html/’ {} \;
commandline iso burning
#dvdisos:
growisofs –dvd-compat -Z /dev/dvdrw=/path/to/file.iso
#cdisos:
cdrecord -v -pad speed=1 dev=/dev/hda src.iso
cisco console cable db9 cat5 adapter
pinouts from db9 to cat5 for cisco console cables:
db9 cat5
1 2 – orange
2 3 – white green
3 6 – green
4 7 – white brown
5 4 – blue, also to 5 – white blue
6 2 – orange
7 8 – brown
8 1 – white orange
9