disc usage commands
- cfdiscs checks how discs are partitioned.
- du -hc -s * (view options) can display how big folders are.
- dd if=rescue.bin of=/dev/fd0 bs=1024 conv=sync ; sync | This copies disc image file to floppy. dd is a byte-for-byte copy.
dpkg
- dpkg --listfiles xboard lists the files in a Debian package
killall
- e.g. killall -9 irssi will send sig 9 to all irssi sessions and kill them.
ldconfig
- /etc/ld.so.conf is a useful file which lists all the paths searched for libraries. Be sure to run ldconfig after changing it for changes to take effect.
networking
- route add -net default gateway 192.168.0.1 sets 192.168.0.1 as the default gateway.
- /etc/network/interfaces is a useful file which configures the default network configuration on boot.
ps tools
- pstops -pa4 '2:0L@.7(21cm,0)+1L@.7(21cm,14.85cm)' lshort.ps lshort2.ps | Doubles up a postscript file, A4 -> A5
- dvips -Pcmz -Pamz -o outfile.ps infile.dvi | Produces postscript file without bitmapped fonts, displays much better.
rm
- rm -- -p is handy for deleting files which begin with a -
shell tricks
- !$$ is macro for last item on last commandline
- !! is macro for whole of last commandline
starlink
- source /star/etc/cshrc | To initialise...
- source /star/etc/login
- cursa
- xcatview | Displays a FITS file in graphical table. Can plot data, or select a subsample, and resave to FITS.
- dtfits | Not part of starlink, distributed by ESO, dumps FITS file to ASCII.
tar
- tar cvfz RayFig.tar.gz RayFigure/ | This tarballs all contents of directory RayFigure into a new tar called RayFig.tar.gz
- tar xvfz RayFig.tar.gz | This extracts tar called RayFig.tar.gz
- Option 'j' does bzipping
- Option 'z' does gzipping
wget
- e.g. wget http://a.b.c/d