Difference between revisions of "Basic linux commands everyone should know!"
import>Jss43 |
import>Csw34 |
||
Line 4: | Line 4: | ||
A really useful guide to [http://www.tldp.org/LDP/abs/html/ bash scripting]. |
A really useful guide to [http://www.tldp.org/LDP/abs/html/ bash scripting]. |
||
+ | |||
+ | * ''cd'' |
||
+ | The ''''c'''hange '''d'''irectory' command |
||
+ | cd |
||
+ | cd ~ |
||
+ | cd /home/user |
||
+ | These all take you to your home directory |
||
+ | cd ../.. |
||
+ | This takes you up two levels of the directory tree |
||
+ | cd newdir |
||
+ | This takes you into the directory called ''newdir'' |
||
+ | cd ~/Documents |
||
+ | This takes you into you Documents folder (actually located at ''/home/user/Documents'') |
||
+ | cd ~csw34 |
||
+ | This takes you into the home directory of user ''csw34'' |
||
+ | cd /sharedscratch/user |
||
+ | This takes you to your ''sharedscratch'' directory (only on clusters) |
||
* ''mkdir'' |
* ''mkdir'' |
Revision as of 09:35, 30 April 2008
Here are a few simple linux commands that should make life a bit easier for you. Please everyone, add anything you think would be useful!
You may want to read the computer office's introduction to Unix booklet .
A really useful guide to bash scripting.
- cd
The 'change directory' command
cd cd ~ cd /home/user
These all take you to your home directory
cd ../..
This takes you up two levels of the directory tree
cd newdir
This takes you into the directory called newdir
cd ~/Documents
This takes you into you Documents folder (actually located at /home/user/Documents)
cd ~csw34
This takes you into the home directory of user csw34
cd /sharedscratch/user
This takes you to your sharedscratch directory (only on clusters)
- mkdir
mkdir newdir newdir2
This will create two new directories, newdir and newdir2
mkdir -p newdir/newdir2
This will create newdir and newdir/newdir2, even if the former doesn't exist.
- xxdiff
xxdiff file1 file2
Much clearer than regular diff (graphical output).
- svn
- find
Can do so much, in a somewhat idiosyncratic manner! See this guide.