For almost all science that is currently going on today, Linux/UNIX is the operating system of choice. However, since most non-scientist type people have little or no experience with Linux, doing even the simplest things can seem daunting. Here are some basic commands and some tips to make life a little easier.
Command | Common Flags and Arguments | Example Usage | What happens |
pwd | none | pwd | print working directory The directory that you are in is printed to the screen. |
ls | -a -l --color Can take a path argument | ls -a -l --color | lists all the files in the current directory including "hidden" files that start with a . (-a) The files will be color coded by type (--color) and the sizes and permissions of each file will be listed (-l). |
ls * | Lists all files in the current directory as well as any files in any subdirectories |
mkdir | Takes the name of the subdirectory to be made | mkdir puppy | A subdirectory named puppy has been created in the current directory |
cd | Takes a relative or absolute path argument. If no argument is given it will take you to your home directory. | cd puppy | change directory You will taken to the subdirctory named puppy if it exists. If it does not exist you will be given the error message -bash: cd: puppy: No such file or directory |
mv | -i Takes two file or directory arguments | mv -i file1.dat puppy/ | move file1.dat has been moved into subdirectory puppy if file1.dat already exists in subdirectory puppy there will be a warning prompt asking if you want to overwrite the already existing file (-i) |
mv file1.dat file2.dat | This command is also the command used for renaming. file1.dat has been renamed to file2.dat |
mv puppy/ cat/ | The directory puppy and all of its contents have been moved to a directory called cat. |
Command | Common Flags and Arguments | Example Usage | What happens |
Command | Common Flags and Arguments | Example Usage | What happens |
Command | Common Flags and Arguments | Example Usage | What happens |