Command Line Flashcards
Prompt
$
For Amazon Linux
Cursor
Where anything typed will show up
echo
display text in output
pwd
present working directory
command format
[command] [arguments…]
man [command]
Displays manual for [command]
Type “q” to exit manual.
Command Line Uses
Restart servers Rename hundreds or thousands of files according to a prescribed pattern Manage system logs Set up scheduled tasks (cron jobs) Debug server issues Monkey patch code on a server Query data Set up databases and servers --- and many more
cd [directory]
change directory
by itself, changes to the home directory, and with argument goes to the indicated directory
ls
list files and directories in current directory
pwd
display the path of the current directory
touch
create a file
mkdir
make directory
rm
remove a file or directory
Is permanent!
cp
copy a file or directory
mv [source] [destination]
move or rename a file or directory movement is relative to current directory .. = parent directory . = current directory /[directory name] = child directory
cat
display contents of a file
more
displays contents of a file, starting at the top and letting the user scroll down
less
display contents of a file in an even ore interactive way