User Tools

Site Tools


2018cmd_list

This is an old revision of the document!


A running list of BASH commands, syntax, and environmental variables

Commands

Command/Program Description example/syntax
9/4/18 - Scripting, executable permissions/conventions.
chmod Change the mode of a file or directory chmod MODE filename
chmod OCTAL-MODE filename
echo “echo” values to the screen echo “string $varname”
nano Edit a file nano filename
rev reverse input stream echo “abcd” | rev
touch Update file modification time. Create file if necessary touch filename
tr Translate or delete characters tr [SET1] [SET2]
which Location of an executable in your PATH which ls
9/6/18
9/11/18

Environmental Variables

Variable name Description example/syntax
9/4/18 - Scripting, executable permissions/conventions.
HOME Your home directory. Same as tilde (~) /home/yourname
PATH Search path for executables. /bin:/usr/bin:$HOME/bin
PS1 Your prompt string. [\h \w]
PWD Your current directory, same as pwd ~/dev
USER Your login/account, same as whoami eid@colostate.edu
9/6/18
9/11/18
2018cmd_list.1536094563.txt.gz · Last modified: 2018/09/04 14:56 by david