Misc Unix Tasks
Generic / Unsorted
- cut : cut -d ' ' -f 1 2
- find : `find /home -name "*.[ch]"`'
- print man pages : man -t <page name here> | lpr
Disks / Images
- floppy formatting : dd if=bootnet.img of=/dev/fd0 bs=1440k (hformat
for hfs, mke2fs for ext2, mkdosfs for dos)
- backup : mkisofs -a -J -R <backupdir> | cdrecod dev=2,0
speed=2 -
- iso : 1) mkisofs -o bin.fs ./bin 2) mount -o loop -w ./bin.fs
/mnt/image
- images :
mkdir /root/initrd
dd if=/dev/zero of=initrd.img bs=1k count=1024 [count= 40960 for 40 MB]
mke2fs -i 1024 -b 1024 -m 5 -F -v initrd.img
mount initrd.img /root/initrd -t ext2 -o loop
cd initrd
[create the files]
cd ..
umount /root/initrd
gzip -c -9 initrd.img > initrdgz.img----
Network / Security Tools
-N --timestamping -- won't download sm file twice.
-r --recursive Recursive web-suck.
-l level, default 5.
-m --mirror sets recursion and time-stamping
-P prefix the directory to save stuff to.
--no-parent don't ascend to parent dir.
-k --convert-links non-relative to relative (locally)
wget --http-user username --http-passwd passwd http://technet.oracle.com/
- scp : scp [user@host1:]filename1 .... [user@host2:]filename2
-p preserve mod time, access time, modes
-B batch mode
-r recursively copy directories
- lynx dump : lynx -dump "URL" > dump.txt
return to 3gwt index