Udemy: MacOSX terminal Flashcards
to list files with detail
ls -l
to get to the root of the system
cd /
to get back to the default root
cd ~
to clear ALL the content
command + k
to find out where terminal commands are stored
which
to exit the manual press
q
to open a file in a simple text editor with options
nano
to open a file directory use the ___ keyword
open
open user home directory in OSX
open ~
text.txt
To open the above file with the DEFAULT application in the terminal
open -e text.tx
open -e
to create a new file
touch
to rename a file use
mv
to copy a file
cp
to delete a file
rm < file name>
make a new folder
mkdir
to go up a directory
cd ..
to make a file in a directory
mkdir -p
go up three directories
cd ../../..
remove a directory with folders
rm -rf
create a file name named me with “helloworld”
echo “me”»_space; “helloworld.txt”
when using a single > will
replace the text
Command that allows for output of a command to be sent to both a file and another command or the terminal screen at the same time.
tee
to find out your loggin
whoami
to change owner use keyword ____
chown
change permissions of file “me.txt” to
sudo chown
sudo chown me.txt
to change a groucp
chgrp
sudo chgrp
to enter as a root user use the command
Bash
to exit as a bash user
exit
make a new directory as a admin with demo 1 , 2, 3
sudo mkdir -p demo/1/2/3
to create a executable bash shell file what is placed on the top of the file
!
how to list ALL files including dot files
ls -al
in bash end an if statement with
fi
the keyword for createing a shortcut
alias