24.12.2012 Views

CSC322 C Programming and UNIX - Department of Computer ...

CSC322 C Programming and UNIX - Department of Computer ...

CSC322 C Programming and UNIX - Department of Computer ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Effective Shell Use: History<br />

Modern shells like the bash or the tcsh keep a history <strong>of</strong> your previous comm<strong>and</strong>s<br />

– Type history to see these comm<strong>and</strong>s<br />

– Type ! re-execute the comm<strong>and</strong> with the given number<br />

– Type ! to re-execute the most recent comm<strong>and</strong> starting with the<br />

(partial) word <br />

Example:<br />

[schulz@gettysburg ∼]$ history<br />

(. . . many entries omitted)<br />

194 more <strong>CSC322</strong>.tex<br />

195 gv <strong>CSC322</strong> 1.pdf<br />

196 ls<br />

197 ll <strong>CSC322</strong> 1.pdf<br />

198 history<br />

– !197 will execute ll <strong>CSC322</strong> 1.pdf<br />

– !g will execute gv <strong>CSC322</strong> 1.pdf<br />

Stephan Schulz 44

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!