examples Flashcards
cd /
change to root directory
cd ~
change to home directory
ls /
show files and dir in root
ls /*ot
show all files in root that end with ot
mkdir ~/cli-tmp
make a directory in your home directory called cli-tmp
cd cli-tmp
touch in-cli-tmp
navigate to cli-tmp and create a file called in-cli-tmp
rm -r cli-tmp
remove directory
mkdir -p ~/cli-tmp/parent/child/grandchild
create a nest of directories in the home directory
mv bob grandchildren
move bob file to grandchildren directory
cp -r grandchildren ../nephews
copy and rename grandchildren into nephews one directory up
PS1=”\u@\w$ “
change prompt
echo ‘export PS1=”this is a test$ “’»_space; ~/.bashrc
export prompt
nano ~/.bashrc
^o + enter
^x
open bashrc in nano to edit file
save file
exit
source ~/.bashrc
rerun bashrc
\h \u \w \W \d \n
hostname username current directory basename of current directory current date newline