ACCRE Cheat Sheet Cat File Print Entire Content of Filename ​ ​ Guide to Linux, Lmod and SLURM Commands More File Incrementally Display Content of Filename ​ ​

ACCRE Cheat Sheet Cat File Print Entire Content of Filename ​ ​ Guide to Linux, Lmod and SLURM Commands More File Incrementally Display Content of Filename ​ ​

Viewing and editing text files ACCRE Cheat Sheet cat file Print entire content of filename ​ ​ Guide to Linux, Lmod and SLURM commands more file Incrementally display content of filename ​ ​ less file Similar to more, but with additional features ​ head file Display file header Accessing ACCRE ​ tail file Display file footer ​ Logging in from a terminal emacs Extensible and customizable text editor ssh [email protected] vim Minimalist yet powerful text editor ​ ​ nano Simple text editor Transferring files between ACCRE and your system scp source [email protected]:destination ​ ​ ​ ​ ​ scp [email protected]:source destination More advanced file management ​ ​ ​ ​ ​ chmod Changes read/write/execute permissions Windows/Mac clients: which cmd Lists the full file path of a command PuTTY SSH client for Windows ​ whereis cmd Lists possible file paths of a command WinSCP SCP client for Windows du dir Lists size of directory dir and its FileZilla FTP client for Linux, Windows, Mac ​ ​ ​ ​ subdirectories Xming/XQuartz X11 server for Windows/Mac find Finds files in a directory Basic Linux file management Aliases and system variables man command Displays the manual page for command ​ ​ alias Automatically replace one command with pwd Prints out the present working directory another ls Lists the files in the current directory env Lists all system variables ls -lh Show long listing of files export var=val Create environment variable $var and set ​ ​ ​ ​ ​ ls -a Show hidden files as well value to val ​ ls dir Lists files inside directory dir echo Print text to the screen ​ ​ rm file Deletes file echo $var Print the value of variable var ​ ​ ​ ​ mkdir dir Creates empty directory called dir .bashrc Define default aliases and system variables ​ ​ rmdir dir Removes empty directory dir ​ ​ Input and output redirection rm -r dir Removes directory dir and all of its content ​ ​ ​ ​ ​ ​ $(command) Runs the command inside $() first, then inserts cd dir Changes directory to dir ​ ​ ​ ​ the output to the rest of the command. Same as cd .. Changes working directory to parent putting grave marks (`) between the command cd Changes working directory to home < Standard input redirection cp file1 file2 Copy file1 into file2 > Standard output redirection ​ ​ ​ ​ ​ ​ cp file dir Makes a copy of file file inside directory dir 2> Standard error redirection ​ ​ ​ ​ ​ ​ mv file1 file2 Renames file file1 as file2 2>&1 Standard error and output redirection ​ ​ ​ ​ ​ ​ mv file dir Moves file file inside directory dir cmd1 | cmd2 Pipe command; redirects output of command ​ ​ ​ ​ ​ ​ ​ ​ cmd1 to input of cmd2 cp -i, mv -i Display a warning before copying or moving to ​ ​ an existing file path Filters rm -i Display a warning before removal wc Word count ~ (tilde) Home directory grep Gets a regular expression and prints it . (period) Current directory sort Sort input .. (double dot) Parent directory uniq Filter duplicate lines wget URL Downloads a file from URL in Internet ​ ​ ​ cut Cuts specific fields or columns unzip file.zip Extract a ZIP file ​ ​ sed Stream editor for search and replace tar xzf Extract a gz compressed tarball file.tar.gz awk Extensive tool for complex filtering tasks ​ vanderbilt.edu/accre ● Hill Center Suite 201 ● 1231 18th Ave. South, Nashville, TN 37212-2807 Revised 11/2018 ​ Cluster directories #SBATCH directives (continued) /home GPFS, backed up nightly --time=min Time limit; either min or ​ dd-hh:mm:ss /data GPFS, backed up nightly --mem=count RAM per node; e.g. 5G /dors GPFS, backed up nightly ​ --output=file Standard output; defaults to /scratch GPFS, higher quotas, not backed up ​ slurm-jobid.out if omitted ​ ​ /tmp Temporary local storage for I/O intensive tasks --error=file Write standard error to file ​ Lmod --array=arrayspec Define job array ​ ​ --gres=gpu:cores GPUs per process module avail Shows all available modules ​ --mail-user=email Email for job alerts module load module Loads module in the environment ​ ​ ​ ​ ​ --mail-type=type Email alert types: BEGIN, END, FAIL, module spider string Searches for module names ​ ​ REQUEUE, ALL matching string ​ --account=account Account to charge module keyword string Searches for modules containing ​ ​ string in name or description --depend=state:jobid Job dependency. state = after, ​ ​ ​ ​ ​ ​ afterok, afterany, afternotok module list List currently loaded modules --job-name=name Job name module unload module Removes module from environment ​ ​ ​ ​ --constrain=attribute Request CPU type: westmere, module purge Removes all modules from ​ sandy_bridge, haswell, eight, twelve, environment sixteen module save collection Saves currently loaded modules to ​ --partition=name Submit to partition: production , collection ​ debug, maxwell, pascal module savelist Returns all saved modules collections SLURM Environment Variables module describe Get modules in a saved collection ​ SLURM_JOBID Job ID module restore Restore modules from collection ​ SLURM_SUBMIT_DIR Job submission directory collection SLURM_SUBMIT_HOST Name of host from which job was SLURM submitted ​ SLURM_JOB_NODELIST Names of nodes allocated to job sbatch filename Submits a job script filename ​ ​ SLURM_ARRAY_TASK_ID Task id within job array squeue -u vunetid Show job queue for user vunetid ​ ​ SLURM_JOB_CPUS_PER_NODE CPU cores per node allocated to job scancel jobid Deletes the job with jobid ​ ​ SLURM_NNODES Number of nodes allocated to job scontrol hold jobid Hold job jobid ​ ​ scontrol release jobid Release job jobid ​ ​ ACCRE-specific utilities sinfo Cluster status ​ accre_storage Check storage quota usage salloc Starts an interactive job rtracejob jobid Check resources utilization for job ​ xalloc Starts an interactive job with X jobid window support q3 Get recent jobs by user, group and srun Launch parallel job step account sacct Display job accounting information qSummary -g group Queue summary for group and its ​ ​ ​ users #SBATCH directives showLimits -g group Get resource limits for specific ​ --nodes=count Number of nodes group ​ --tasks-per-node=count Processes per node SlurmActive Show cluster’s CPU/node utilization ​ --ntasks=count Total processes gpustate Show GPU cluster utilization ​ --cpus-per-task=count CPU cores per process sinfofeatures Get node availability based on ​ features --nodelist=nodes Preferred nodes ​ --exclude=nodes Nodes to avoid ​ vanderbilt.edu/accre ● Hill Center Suite 201 ● 1231 18th Ave. South, Nashville, TN 37212-2807 Revised 11/2018 ​ .

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    2 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us