String replace
sed -i 's|STRING_FROM|STRING_TO|g' FILE
Fix file permissions
find /media/images/ -type f -exec chmod 666 {} \;
add line to a file
sed -i '13i\YOUR_TEXT' FILE
Extract RPM Archiv
rpm2cpio FILENAME | cpio -i --make-directories
Get file atime, mtime, ctime
stat FILE
Change mtime from a file
touch -d "2005-05-05 15:55:55" FILE
Create selfextract archive under Linux
makeself.sh [-bzip2] DIR archiv.run "DESCRIPTION" COMMAND
Create Linux software RAID
mdadm --create /dev/md2 --level=raid5 --raid-devices=4 --spare-devices=0 /dev/sdb4
/dev/sdc4 /dev/sdd4
Wake On Lan (WOL)
wakeonlan 00:11:22:33:44:55
Change root and start bash
chroot /mnt /bin/bash
Enable / Disable swap
swapoff -a
swapon -a
extract initrd.gz
gunzip [geshifilter- ../initrd.gz | cpio -i --make-directories