####################################### General Bash ###################################### top - system monitor ps -ef | grep perl - shows all processes running that match with perl - the f shows the command that was used to start the process kill - ends a pid in the process list (-ps) - use kill -9 for a stronger kill ------------------------------------------ ls -a - shows all files, including hidden ls -l - shows permissions of files in directory - shows bytes of each file too - add h (ls -lh) for display mb - pipe to more to wait to print (ls -lh | more) ------------------------------------------ du -hs - gets the size of the directory in GB df -h - gets the percentage of disk space used in the directory - also shows amount used and amount remaining - df -h /home/ for percentage used on total machine ------------------------------------------- chmod ugo+wrx - gives all permissions ------------------------------------------ sudo apt-get install - downloads and installs a linux package sudo apt-cache search - searches for a linux package name ------------------------------------------ emacs .bashrc - edits the .bashrc file - should be called when in home directory (e.g. /home/) source .bashrc - allows you to use your newly modified .bashrc file (call after editing it) ------------------------------------------ tail -f - displays the end of a file as it grows - useful for monitoring nohup.h as it runs less - like more but allows scrolling. ctrl + d to get to the end ------------------------------------------ rm -rf - remove a directory and all files/subfolders in it rm *~ -removes all files with a tilda in current directory ######################################### Perl and CPAN ######################################## sudo perl -MCPAN -e shell > install :: > m ####################################### Git on SourceForge ####################################### initial commit: git init git config user.name git config user.email @users.sourceforge.net git remote add origin ssh://@git.code.sf.net/p/ git add --all git commit -a -m 'Initial commit' git push -u origin master subsequent commits: git add --all git commit -a -m '' git push -u origin master clone a code to a new machine: git clone ssh://@git.code.sf.net/p/ git config user.name git config user.email @users.sourceforge.net merge local code from remote code: git pull origin master replace local code with remote code: git fetch origin git reset --hard origin/master ############################################# Jasmine ############################################ FTP: sftp -oPort=20025 @jasmine.cs.vcu.edu -connects to jasmine with ftp get - downloads from ftp to local directory put - uploads from local to ftp SSH: ssh -p 20025 -Y @jasmine.cs.vcu.edu - ssh for jasmine, then enter password at prompt nohup >& & - allows processes to run in the background and without a terminal being open - good for submitting jobs - all stdout is output to the (optional)