Linux Commands

Basics

Frequent Commands

//escape the space by \
$cd Programming\ Assignments

Direct the content to text file

$cat /proc/cpuinfo > processors_spec.txt
$echo "abcde text" >> README.md
// > is overwrite, >> is append

Timing a process / program

$time ./ptsm 15 64 cities15.txt

real: The actual time spent in running the process from start to finish, as if it was measured by a human with a stopwatch

user: The cumulative time spent by all the CPUs during the computation

sys: The cumulative time spent by all the CPUs during system-related tasks such as memory allocation.

Notice that sometimes user + sys might be greater than real, as multiple processors may work in parallel.

File Transfer

To upload a file from your laptop to Amazon instance:

$scp -i ~/Desktop/amazon.pem ~/Desktop/MS115.fa  [email protected]:~/data/

results matching ""

    No results matching ""