PE day 1 Bash Flashcards
What is typed to clear your terminal?
clear…duh
What will give you a history of all the past commands you’ve typed in the shell?
history…also duh
what command copies files/directories?
cp
What shows your current working directory?
PWD (print working directory)
To stop a process from executing in shell what command can you run?
ctl + c
What keyboard command will do the same thing as hitting the up arrow?
ctl + p (as in previous)
What keyboard command will do the same thing as hitting the down arrow
ctl + n (for Next)
What command will allow you to simply escape out of a loop in progress?
break ( as in you need to break free)
What would you run to kill a process using a specific PID? (the command before the PID)
kill -9 (don’t know why, look it up, but i remember it by using a 9mm ;)
What is the alternate command for echo?
printf
If I wanted to display the PID of the last executed command, what variable would I echo?
myapp& echo
What command would show the last 5 lines of file1?
tail -5 file1
What command would show the first 5 lines of file1?
head -5 file1
If you wanted to find the process name from process id 8675, what command would you run?
ps -p 8675
To change a file so that it can be an executable what command do you run?
chmod 777