Bash Commands Flashcards
ls
lists the directory contents, common flags are -a, -l
echo
prints text to the terminal window. Used in scripts and batch files, shows the value of environmental variables. Common flags; -e, -n
touch
creates files in the current directory. Common flags; -a, -m, -r, -d
mkdir
Makes a directory in the current directory.
grep
“Global Regular Expression” searches for text patterns specified by the user. Common options; -i, -c, -n, -r, -v
man
print manual or get help for a command.
pwd
“Print Working Directory”
cd
“change directory”
.. to go up one directory
use a name to go into
or an absolute path
mv
Move/Rename a directory
rmdir
removes empty directories
rm
removes directories/files
rm -r //force remove file/directory
locate
finds a file or directory
less
allows user to view the contents of a file in the terminal
compgen
shows all available commands, aliases, and functions.
cat
a command for reading files, creating files, and concatenating files.