-originally there was dpkg (debian package management system)
-APT was built on top, to deal with .debs and .rpms (?)
-aptitude is a terminal based front-end
-synaptic is a GUI front-end
TERMINAL BASED PACKAGE MANAGEMENT
-search title and description with apt-cache
apt-cache search svn |sort
-filter installed packages by sending the output of that into dpkg
dpkg -l `apt-cache search svn |cut -d' ' -f1` 2> /dev/null |grep ii
ACCESSING MSSQL DBs with PHP on LINUX
-install php5-sybase (this allows basic functionality like mssql_connect() and executing basic queries, but may fail for some advanced MSSQL operations)
THEN THE COMMANDS (described with MySQL terminology)
-connect
sqsh -S server -U user -P password -D database
-execute commands (enter command first, no need for semi-colons)
go
-finish
exit
The most important tool you will need: rsync. It copies changes between 2 directories (potentially on 2 different servers)
rsync -av src_dir/ user@server:/dest_dir/
-a means archive mode, which means recursive, preserve permissions, last modified time etc
-v means verbose
-DONT: use an asterisk in the src-dir i.e. rsync src_dir/* dest_dir/ as this will NOT include hidden files
OTHER FLAGS
-tar (-c for create, -x for extract) - tar alone simply creates a collection (Tape ARchive) of uncompressed files.
tar -cvf result.tar file1 file2 file3
tar -xvf file.tar
NOTES: compression algorithms:
-add -j for bzip2 compression (AMAZING for plain english text i.e. 200M down to 14M). result file extension: .tbz or .tar.bz2
-add -z for gzip compression (good for general use). result file extension: .tgz or .tar.gz
-rar (a for add)
rar a output.rar file1 file2 file3
-unrar (e for extract)
unrar e file.rar
ADDITION: see extractrars script in Linux>shell scripting
Add these to the end of your ~/.bashrc
# how I like ls to work: coloured, grouping directories first, and appending '/' to them so they are clear i.e. "home/"
alias ls='ls --color=auto --group-directories-first -p'
# a common alias: ll for human readable list form
alias ll='ls -hl'
# little simplification for getting the size of a directory
alias dirsize='du -sh'
# disk space (i have added a grep to customise the output, which is specific to my partition setup)
alias diskspace='df -h | grep /dev/sda'
# alias grep for highlighted search terms and case insensitivity
alias grep='grep -i --color=auto'