examples Flashcards Preview

command line > examples > Flashcards

Flashcards in examples Deck (17):
1

cd /

change to root directory

2

cd ~

change to home directory

3

ls /

show files and dir in root

4

ls /*ot

show all files in root that end with ot

5

mkdir ~/cli-tmp

make a directory in your home directory called cli-tmp

6

cd cli-tmp
touch in-cli-tmp

navigate to cli-tmp and create a file called in-cli-tmp

7

rm -r cli-tmp

remove directory

8

mkdir -p ~/cli-tmp/parent/child/grandchild

create a nest of directories in the home directory

9

mv bob grandchildren

move bob file to grandchildren directory

10

cp -r grandchildren ../nephews

copy and rename grandchildren into nephews one directory up

11

PS1="\u@\w$ "

change prompt

12

echo 'export PS1="this is a test$ "' >> ~/.bashrc

export prompt

13

nano ~/.bashrc
^o + enter
^x

open bashrc in nano to edit file
save file
exit

14

source ~/.bashrc

rerun bashrc

15

\h
\u
\w
\W
\d
\n

hostname
username
current directory
basename of current directory
current date
newline

16

$PATH

determines which files can be executed without specifying their path explicitly.

17

what two types of permissions are there
and what types are there of those specific permissions

ownership:user,group,other and access:read,write,execute