This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
useful_commands [2012/10/06 12:43] 85.218.109.130 |
useful_commands [2012/10/06 12:51] 85.218.109.130 |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | run a command in xterm, keep xterm open even after the process finished or exited with an error | + | ==== ls by last edited... ==== |
+ | |||
+ | * return the last edited file | ||
+ | |||
+ | <code>ls -ct1 | head -1</code> | ||
+ | |||
+ | broken into elements: | ||
+ | |||
+ | <code>ls -c #sorts by ctime, newest first | ||
+ | ls -clt #shows ctime and sorts by ctime | ||
+ | ls -cl #show ctime, sorts by name | ||
+ | </code> | ||
+ | |||
+ | |||
+ | ==== xterm: keep open ==== | ||
+ | |||
+ | |||
+ | * run a command in xterm, keep xterm open even after the process finished or exited with an error | ||
<code bash>xterm -xrm '*hold: true' -e $1 & # this is to keep xterm from closing | <code bash>xterm -xrm '*hold: true' -e $1 & # this is to keep xterm from closing |