Last active
August 29, 2015 14:10
-
-
Save Jfortin1/1dcb6d227916d31bb698 to your computer and use it in GitHub Desktop.
Commands that I always forget
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# To ask for more writing memory: | |
-l h_fsize=40G | |
# Tar | |
tar -xvfz | |
# To remove all deleted files from git repo: | |
git rm $(git ls-files --deleted) | |
# In R: | |
i=as.numeric(commandArgs(TRUE)[1]) | |
# To delete all my jobs on the cluster: | |
qdel -u jfortin | |
# To create a symbolic link: | |
ln -s {/path/to/file-name} {link-name} | |
# What to put in a shell script to run an R job with 2 parameters: | |
Rscript yourScript.R $1 $2 | |
# Example of for loop in shell: | |
for i in {1..8} | |
do | |
qsub -cwd -V -l mem_free=10G,h_vmem=12G yourScript.sh $i; | |
sleep 50 | |
done | |
# To get all the files from a directory | |
wget -r -np -k -nd http://www.something.com/directory/ | |
# To name screen sessions: | |
screen -S yourName | |
# Useful R commands: | |
pmin, pmax, ifelse | |
# Useful Unix commands: | |
comm, join, merge, cut, jobs, "&" after running a command, fg, tee, cd -, | |
# | |
curl ftp://path/file.txt.gz | gunzip -cd | head | |
# To count how many jobs are running: | |
qstat | cut -d " " -f 10 | grep "r" | wc -l |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment