BASH commands Flashcards
pwd
Presenting/print working directory
ls
List contents of current directory (folder)
ls*_______
Lists all files that end in a certain type (.pdf – .txt – .jpeg)
- string of characters
? - one character
- string of characters
man COMMAND
Allows user to learn about the command options
Replace command with a BASH function
ls READ* > myfile.txt
Lists all files that start with READ and saves the list to a file name
READ is the string in the filename you are wanting to find
mkdir my_dir
Makes a new subdirectory(file) off the present working directory
cd DIRECTORY
Change to a subdirectory of the presenting working directory
cd DIRECTORY/SUBDIRECTORY
Allows to change into nested subdirectories
cd ../
Allows you to move up one directory (parent directory)
cp README.text ./directory/
Copies file
./directory/ indicates copying within the current directory
cp -r directory1 directory2
Copies directory AND its
contents
-r indicates recursive, meaning that it will operate on the entire directory tree
mv file.txt ./directory/
Moves a file/directory within the current directory
rm directory/filename
Remove/deletes a file from directory
rm -r directory
Removes a directory and its contents
recursive
cat filename.txt
Allows viewing a file with that filename
more filename.txt
View the file page by page
head, tail, wc, sort, uniq, grep, sed
Other commands for viewing text files
module avail
Listing of all modules and versions of the system available to the user
module spider NAME
Detailed info about the software and instructions for loading
module load NAME
Loads module and makes software available for use during current session
module list
Keeps track of active modules (documents computational envt for reproducibility)
sinfo -M gpu
SLURM management
Clusters current state, availability, node list, time limits, current usage status
sequeue -u username
Allows users to monitor and manage their active HPC jobs
module purge
Unloads previously loaded modules