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
Last revisionBoth sides next revision
shellsnippets [2008/02/22 23:59] – old revision restored 217.233.197.66shellsnippets [2010/11/01 16:43] – old revision restored andi
Line 17: Line 17:
 ===== Delete empty directories ===== ===== Delete empty directories =====
  
-  $> find . -depth -type d -empty -exec rmdir {} \; +  $> find . -type d -empty -delete
  
 ===== Execute a local shellscript on a remote host ===== ===== Execute a local shellscript on a remote host =====
Line 109: Line 108:
 echo "The scripts absolute path is $p" echo "The scripts absolute path is $p"
 </code> </code>
 +
 +Or you could just use readlink, which also resolves symlinks:
 +
 +    $> readlink -f ~/.bashrc
 +    /home/andi/.bashrc
  
 ===== Print ANSI colors ===== ===== Print ANSI colors =====
shellsnippets.txt · Last modified: 2012/12/16 11:28 by 2001:6f8:1c1a:0:922b:34ff:fe18:7138