User Tools

Site Tools


shellsnippets

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
shellsnippets [2010/11/01 16:11] 122.179.29.74shellsnippets [2012/12/16 11:28] (current) – [Set system date by time from webserver] 2001:6f8:1c1a:0:922b:34ff:fe18:7138
Line 1: Line 1:
-**====== Shell ======+====== Shell ======
  
 ===== Useful standard utilities ===== ===== Useful standard utilities =====
Line 22: Line 22:
  
  
-  $> cat script.sh |ssh user@host "bash -s":**Bold Text**+  $> cat script.sh |ssh user@host "bash -s"
  
  
Line 159: Line 159:
 Sometimes you want to set the system date of Unix system to some sane value. You could do it manually or use some NTP client. The first idea is too much work ;-) and for the second one you need a time server and some client installed. But why not use the HTTP Response Header ''Date''? Well you could use again some client tool like [[http://www.clevervest.com/htp/intro.html|htp]] or just use this snippet. Sometimes you want to set the system date of Unix system to some sane value. You could do it manually or use some NTP client. The first idea is too much work ;-) and for the second one you need a time server and some client installed. But why not use the HTTP Response Header ''Date''? Well you could use again some client tool like [[http://www.clevervest.com/htp/intro.html|htp]] or just use this snippet.
  
-  #> date -s "`lynx -dump -head http://www.kernel.org |grep 'Date:'|awk -F': ' '{print $2}'`"+  #> date -s "`curl -http://www.kernel.org |grep 'Date:'|awk -F': ' '{print $2}'`"
  
 ===== Backups with afio ===== ===== Backups with afio =====
Line 223: Line 223:
   * you can put this function in a file that is sourced when you log in, for example /etc/profile.local   * you can put this function in a file that is sourced when you log in, for example /etc/profile.local
   * of course you can omit ''-P $3'' when you always print with your default printer   * of course you can omit ''-P $3'' when you always print with your default printer
-  * on my machines, the duplex setting is ignored, it's always printing on one side of the paper**+  * on my machines, the duplex setting is ignored, it's always printing on one side of the paper
shellsnippets.1288627881.txt.gz · Last modified: 2010/11/01 16:11 by 122.179.29.74