Skip to content

Instantly share code, notes, and snippets.

View sivadasetty's full-sized avatar
:octocat:

Siva K. Dasetty sivadasetty

:octocat:
View GitHub Profile
@sivadasetty
sivadasetty / find_num_files.md
Last active October 16, 2023 14:04
Find number of files in a directory

find . -type f | wc -l (for total number of files in the current directory .)

find . -type d -exec sh -c 'echo "$(find "{}" -maxdepth 1 -type f | wc -l) {}"' \; | awk '$1 > 1000 {print}' (number of files greater than 1000 in the current directory .)

Method 1:

Connect via ssh

  1. Terminal 1: ssh <username>@xxxx.yyyy.zzzz.edu
  2. Get a interactive compute node

Create conda environment

  1. conda create --prefix <path-to-environment/environment_name> python=XXXX
  2. conda activate <path-to-environment/environment_name>
  3. conda env update --file <environment.yml>
@sivadasetty
sivadasetty / slurm-resources.sh
Created August 12, 2022 01:42
Check node details using sinfo
sinfo -p gm4 -o "%15N %.5a %.10l %10c %10G %10m %.6D %.6t %.0f" -Ne
@sivadasetty
sivadasetty / cq-jobs.sh
Created August 5, 2022 18:39
Check running jobs on cluster utilizing slurm
squeue -u <username> -p <partition> | awk 'NR>1{print $1}' | xargs -n 1 scontrol show job -d | grep 'StdOut'