In the Java course I am taking our teacher uses the command line to program. I have started to get to grips with entering things in the command line. I have always been very scared of the terminal, but it is not so scary after all. A big hold back was knowing the commands, and what they do. So I have made a very basic list below of commands and described briefly what they do. It is an ongoing list, which I will continue to add to as the course goes on.
This is a list I’ll use for reference, if you happen to stumble upon this list and want to use some of the prompts please do a bit more research first as I am by no means an expert and don’t want to break your computer!
|cd [name of directory]||change directory||change the folder you are in, like clicking on a folder|
|cd ..||go back a directory||moves you back one folder, like the back arrow|
|ls||list directory||see all the files / folders in the current directory you are in|
|mv||move a file||move a file to another directory e.g.
|mv||move a directory||move a file to another directory e.g.
|mv + rename||move and rename||move a file to another directory and rename it e.g.
|mv *many||move lots||move multiple file to another directory e.g.
|cp||copy a file||copy a file to another directory e.g.
|cp -R||copy a directory||copy a whole directory to another directory e.g.
|cp + rename||copy and rename||copy a file to another directory and rename it e.g.
|cp *many||copy lots||copy multiple files into to another directory e.g.
|mkdir||make directory||when in directory e.g.
|vi [name of file]||open in vim||opens the file with name you insert in vim so that you can edit|
|(when in vim) i||edit in vim||like actually opening a file so you can edit|
|(when in vim) :w||save (write)||like saving a file|
|(when in vim) :q||quit vim||get out of vim and back into the “terminal”|
Some – – – > resources.
|mogrify resize||modify size||warning! will overwrite the file, make a copy first! modifies the file in various ways. need to be in the directory e.g. <
|convert||convert the file format||
COMPILE / RUN
|javac [name of file]||compile in java||like compile / flash|
|java [name of file]||run java program||like running a sketch, need to be in the same directory as the java file|
|python [name of file]||run python program||like running a sketch, need to be in the same directory as the python file|