Useful shell commands » History » Version 9
Amber Herold, 11/01/2011 12:23 PM
1 | 1 | Amber Herold | h1. Useful shell commands |
---|---|---|---|
2 | |||
3 | 9 | Amber Herold | Link to "top 10 cheat sheets":http://www.cyberciti.biz/tips/linux-unix-commands-cheat-sheets.html. |
4 | |||
5 | 7 | Amber Herold | |
6 | h3. make a folder writable |
||
7 | |||
8 | <pre> chmod -R g+rw eman_recon14</pre> |
||
9 | |||
10 | 1 | Amber Herold | h3. check the status of a job |
11 | |||
12 | # ssh to the processing server |
||
13 | # <pre>qstat -au YOUR_USER_NAME</pre> |
||
14 | # will list your jobs |
||
15 | |||
16 | 7 | Amber Herold | h3. check which nodes are currently being used on processing machine |
17 | 1 | Amber Herold | |
18 | 7 | Amber Herold | <pre> |
19 | qstat -an |
||
20 | </pre> |
||
21 | 1 | Amber Herold | |
22 | |||
23 | h3. kill a process |
||
24 | |||
25 | # Log into the machine it is running on |
||
26 | <pre>ssh fly</pre> |
||
27 | # Look for processes with your user name |
||
28 | <pre>ps -ef |grep [your_username]</pre> |
||
29 | # Kill the process using the number in the first column after your username |
||
30 | <pre>kill [process id]</pre> |
||
31 | # If the process was a copy, remove the destination folder |
||
32 | <pre>rm [destination folder]</pre> |
||
33 | # list system stats |
||
34 | <pre>top</pre> |
||
35 | 2 | Amber Herold | |
36 | 5 | Amber Herold | h3. submit a job to a job manager |
37 | |||
38 | <pre> |
||
39 | qsub <jobfilename> |
||
40 | </pre> |
||
41 | |||
42 | 4 | Amber Herold | h3. Kill a job running through the job manager |
43 | 2 | Amber Herold | |
44 | 3 | Amber Herold | * use *qdel* <job number> |
45 | 5 | Amber Herold | |
46 | h3. Start an interactive session on a node |
||
47 | |||
48 | <pre> |
||
49 | qsub -I |
||
50 | </pre> |
||
51 | |||
52 | 6 | Amber Herold | you can type in job file contents line by line and see results. |
53 | 1 | Amber Herold | |
54 | 6 | Amber Herold | h3. Check how much space is available on a data drive |
55 | |||
56 | 8 | Amber Herold | * cd to the drive (cd /ami/data00) and type: |
57 | 1 | Amber Herold | <pre> |
58 | df -h . |
||
59 | </pre> |
||
60 | 7 | Amber Herold | |
61 | * to show disc usage status of all mounted systems: |
||
62 | <pre> |
||
63 | df -h |
||
64 | </pre> |
||
65 | 6 | Amber Herold | |
66 | h3. See what groups a user belongs to |
||
67 | |||
68 | <pre> |
||
69 | id <username> |
||
70 | </pre> |