VMWARE Linux Command Prompt Flashcards
What does $cd / do?
Take you to the root directory
What does $cd ~
Take you to the home directory
what does $pwd do?
pwd shows you the current directory your in / route or pathway
What does $ls do?
lists all the directorys and files in the current directory.
$cd ..
goes back a directory/goes out a directory
What is absolute addressing?
Absolute addressing takes you straight to the place you want to go
starting from the root.
e.g.
$cd /lib/books
What is relative adressing?
Relative addressing takes you to the place you want to go in steps. starting from the current directory for example.
e.g.
$cd ../../lib/books
As you can see this doesn’t start with a / as well because its relative
What does $mv file1.txt milo
it moves file1.txt into the milo directory
What does $mkdir milo
Makes a directory called milo
What does $rm -r milo
deletes the directory called milo
(You have to add a -r if you’re trying to delete a directory)
What does $rm file1.txt
deletes the file1.txt
What does $man mv
Shows a manual page of mv/instructions of what it does
What does $touch file1.txt do?
It creates the file called file1.txt
What does $echo funny guy > file1.txt do?
puts funny guy into file1.txt
What does $cat file1.txt do?
It shows the contents of the file1.txt
$Ps a
Shows all running directory’s or files.
What does $bash rage.sh do?
bash is the first word before running a script.
for example.
bash rage.sh
If there is any code in the file it will run for example:
cat file1.txt – (This will print the contents of file1.txt when $bash rage.sh is run)