Tuesday, July 24, 2012

Empty out multiple file contents all at once


There are various ways to do so - BUT below is what I found a quicker / shorter and very precise.


#echo FileNames | xargs -n1 cp /dev/null

In my case I was trying zip out an archive keeping apache log file name along with other important confg files  BUT without their(apache logs)  heavy content inside them - the data which is already stale for me.

#echo ws*_access.log  | xargs -n1 cp /dev/null

-DK

Architectural Tradeoffs

"In the 1620's Sweden and Poland were at war. Wanting a quick end to this costly war, the King of Sweden commissioned the buil...