File Transfer using scp

scp transferring file To transfer a file securely to another machine – type: scp file1.txt tom@server2:$HOME This example presents transferring file1.txt from our host to server2’s user tom’s home directory. …

Devamını Oku..

Job Control

List background processes $ jobs [1] Running sleep 500 & (wd: ~) [2]- Running sleep 600 & (wd: ~) [3]+ Running ./Fritzing & First field shows the job ids. The …

Devamını Oku..

Case statement

Simple case statement In its simplest form supported by all versions of bash, case statement executes the case that matches the pattern. ;; operator breaks after the first match, if …

Devamını Oku..

Brace Expansion

Modifying filename extension $ mv filename.{jar,zip} This expands into mv filename.jar filename.zip . Create directories to group files by month and year $ mkdir 20{09..11}-{01..12} Entering the ls command will …

Devamını Oku..

Customizing PS1

Colorize and customize terminal prompt This is how the author sets their personal PS1 variable: gitPS1(){ gitps1=$(git branch 2>/dev/null | grep '*') gitps1="${gitps1:+ (${gitps1/#\* /})}" echo "$gitps1" } #Please use …

Devamını Oku..