mkdir -p folder/subfolder
- Inculde creation of parent dirtail -f
- Monitor a log filels -lah
- List files with better informationdu -h -d1
- List top level directory space usagesrun --ntasks=1 --cpus-per-task=1 --partition=int --time=4:00:0 --mem=4G --pty /bin/bash
- Create interactive node on CAMPpwd
- Show current pathwhoami
- Current login usernametree
- Tree directory structureln -s <source> <dest>
- Symbolic linkfind ./myfolder -mindepth 1 ! -regex '^./myfolder/test2\(/.*\)?' -delete
- this will delete all folders inside ./myfolder except that ./myfolder/test2 and all its contents will be preserved
screen -S nextflow -m bash -c 'sh run.sh; exec sh'
- Run named screen session with wait command at end so window doesnt auto-closescreen -ls
- List screensscreen -r 344074
- Attatch to running screen with number before decimal pointscreen -X -S [session # you want to kill] quit
- kill session- Screen
ctrl+a+d
detatch
sudo nano /etc/paths
- Edit path on mac
nextflow run <REPO>
- Runs pipeline from githubnextflow pull <REPO>
- Updates repo from githubnextflow run <SCRIPT> -w <WORKDIR>
- Specify work dirnextflow run <SCRIPT> -ansi-log false
- Change log to each task (good for debugging)singularity pull --name <NAME>.img docker://<PATH>:<TAG> > /<TAG>/null
- Pull custom docker imagerm -rf ~/.nextflow/assets/<REPO-PATH>
- Removes downloaded repo if switching branches etcrm -rf .nextflow* results work
- Clean a working directory if having problems
vagrant init
-- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.vagrant init <boxpath>
-- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example,vagrant init ubuntu/trusty64
.
vagrant up
-- starts vagrant environment (also provisions only on the FIRST vagrant up)vagrant resume
-- resume a suspended machine (vagrant up works just fine for this as well)vagrant provision
-- forces reprovisioning of the vagrant machinevagrant reload
-- restarts vagrant machine, loads new Vagrantfile configurationvagrant reload --provision
-- restart the virtual machine and force provisioning
vagrant ssh
-- connects to machine via SSHvagrant ssh <boxname>
-- If you give your box a name in your Vagrantfile, you can ssh into it with boxname. Works from any directory.
vagrant halt
-- stops the vagrant machinevagrant suspend
-- suspends a virtual machine (remembers state)
vagrant destroy
-- stops and deletes all traces of the vagrant machinevagrant destroy -f
-- same as above, without confirmation
docker build -t <CONTAINER>:<TAG> <FOLDER CONTAINING DOCKERFILE>
-- build new image from docker filedocker images
-- View local imagesdocker run -it <CONTAINER>:<TAG> /bin/bash
-- Run a container with an interactive shelldocker push <CONTAINER>:<TAG>
-- Pushes local image to docker hubdocker image prune
-- By default, docker image prune only cleans up dangling images. A dangling image is one that is not tagged and is not referenced by any container.docker image prune -a
--To remove all images which are not used by existing containers, use the -a flag:docker image rm <CONTAINER_ID>
-- Remove specific image