PythonBasics Flashcards
print working directory
pwd
my computer’s network name
hostname
make directory
mkdir
change directory
cd
list directory
ls
what should you do if you get lost in terminal?
write “pwd” to print working directory and next “cd ~ ” to get back to home
How do you create a folder with multiple words in the name?
write mkdir for creating a folder and then put “” around the name. For example,…. Mkdir “that’s pretty cool”.
remove directory
rmdir
What does “cd ..” do?
it takes you back one folder from for example /desktop/temp/stuff to /desktop/temp, This can also be done for multiple folders back with ../../.. (3 folders back)
What does CLI mean?
Command line interface
What does GUI mean?
graphical user interface
What will “ls -1R” do?
it will show you an overview of all folders below your current position.

push directory
pushd (go to new location)
pop directory
popd (return to saved location)
what does “mkdir -p” do?
lets you create an entire directory at once aka. Multiple folders in a tree. Mkdir -p kap/jokap/chakap/ja/sådan/er/det
copy a file or directory
cp
move a file or directory
mv
What can be the problem if you are not allowed to rmdir a directory?
First of all there could be files within that folder you try to delete. Secondly, if you are 100 % sure that there is nothing, it may be due to the Mac OSX issue of an “.DS_Store” file, which you can delete by going to the folder and write “rm -rf .DS_Store”
page through a file
less
print the whole file
cat
What will
mkdir something
cp awesome.txt something/
Do?
first we create a new folder/directory. Next we make a copy of the file awesome.txt from current pwd to this new folder called “something”
create a new file
touch (write…. “touch iamcool.txt” for example)
How do we copy a file?
go to the directory of the file and write “cp filename.txt newfilesname.text”
execute arguments
xargs


























































































































































































































