---+ Unix Commands Quick Reference Useful commands and flags that we get tired of looking up... ---++ Disk Space The <code>du</code> command is verbose and confusing if you run it without options. Here is how to get a human-readable output and a grand total for the path argument (omit for current directory). <code>du -hc</code> ---++ Fixing Line Endings If you get odd errors after transferring a text file from a PC or Mac to a Unix machine, it's likely that you have a problem with [[http://en.wikipedia.org/wiki/Newline][newline characters]]. This is especially common when editing files in Excel and saving them to tab-delimited or comma-delimited files for input into. You can generally avoid this problem and fix the line endings by using an industrial strength text editor. This command converts Mac line endings in a saved Excel file to Unix line endings. <code>tr "\r" "\n" < input.tab >.converted.tab</code> ---++ Merging commands to be serial on TACC Sometimes you have 96 short jobs that you want to run serially 8 at a time on 12 cores rather than requesting 96 cores. This command will combine every 8 lines in a file into one line separated by && so that these commands are now run on one core. <code>paste -s -d'#######\n' commands | sed "s/#/ \&\& /g" > commands8</code> ---++ Adding your path to the command prompt Add to your <code>.bashrc</code> or similar bash startup script: <code>export PS1='\w\$ '</code>
Edit
|
Attach
|
Watch
|
P
rint version
|
H
istory
:
r8
|
r6
<
r5
<
r4
<
r3
|
B
acklinks
|
V
iew topic
|
More topic actions...
Barrick Lab
>
ComputationList
>
ProtocolsUnixCommandsQuickReference
Contributors to this topic
JeffreyBarrick, LucyLeblanc
Topic revision: r4 - 2016-02-29 - 21:09:40 - Main.JeffreyBarrick
Barrick Lab
Contact
Research
Publications
Team
Protocols
Reference
Software
UT Austin
Mol Biosciences
ILS
Microbiology
EEB
CSSB
CBRS
The LTEE
iGEM team
SynBioCyc
SynBio course
NGS course
BEACON
Search
Log in
Copyright ©2025 Barrick Lab contributing authors. Ideas, requests, problems?
Send feedback