usb connections
system_profiler SPUSBDataType
ssh [email protected]
ssh [email protected]
#lab conda:
conda activate /projects/community/holmesenv
#current sitepackages for python
python3 -c "import site; print(site.getsitepackages())"
####### AMAREL
mmlsquota -j f_ah1491_1 --block-size=auto projectsp
#globus endpoint: "kaley_endpoint_amarel", id: f525319e-b71c-11ef-b839-115107518ebc
groups # prints out what groups you're a part of
alias name='command' ## create an alias for a specific command
#ex: `alis amarel='ssh [email protected]'`
####### SLURM
sbatch my_job.sh
sacct --format=JobId,JobName%90,Partition%15,State,Elapsed,ExitCode,Start,End --starttime=2024-09-26T10:43:21 #example of vars
watch -n 1 squeue -u kj537 #watch your live currently running jobs
# Control+C to exit
scancel -u username #cancel all jobs, ** will also cancel jupyter sessilsons
###### BASH
### amount of space a dir is using
du -sh /path/to/directory | sort -h #`| sort -h` sorts subdirectories biggest to smallest
#delete folder + contents
rm -r /path/to/folder
### delete all directories in a target directory recursively w/o deleting the folder itself
find "/path/to/folder" -type d -exec rm -rf {} +
### move a folder somewhere with err and out files
mv /path/to/folder /path/to/folder/destination/ 1> ~/name.out 2> ~/name.err &
### copy from rutgers env to local computer
scp -r [email protected]:/remote/path '/local/path'
##### PROFILES
# change to zsh / bash
zsh
bash
# Edit
nano ~/.zshrc
nano ~/.bashrc
nano ~/.bash_profile
### output directory structure of all files/folders
find /path/to/your/folder | sed 's|[^/]*/| |g'
### output directory+files structure
tree /path/to/folder
# Startup app
jekyll bundle serve
### run a script from terminal, in background, save errfiles and outfiles
command 1> /path/name.out 2> /path/name.err &
#example
python3 -u pca_predictions.py 1> pca_predictions.out 2> pca_predictions.err &
replace 'command' with whatever you would usually put in the command line replace '/path' with wherever you want the name.out/.err file to be saved replace 'name' with whatever you want the .out/.err file to be named
rsync -avz -partial -progress -e "ssh" /path/to/local/directory/ username@remote_host:/path/to/remote/directory/
a
→ Archive mode (preserves permissions, timestamps, symbolic links, etc.).v
→ Verbose output.-z
→ compresses data during transfer using gzip-like compression.-partial
→ Keeps partially transferred files, so they don’t restart from 0%.-progress
→ Shows live progress.--append
→ Resumes incomplete files instead of overwriting them.
--append-verify
→ Like --append
, but double-checks integrity.-e
flag allows you to specify the remote shell to use, usually for SSH.