This is an old revision of the document!


Three lines tip

Do you have a tip/hack that's max. three lines long??

Removing whitespaces from filename

 # i in *.[jJ][pP][gG]; do mv "$i" $(echo "$i" | sed "s/ /_/g"); done

ali

 # rename 's/ /_/' *.[jJ][pP][gG]

:)

How to get Webserver Version

 # printf "HEAD / HTTP/1.0nn" | nc $server 80 | grep Server

Spliting .tgz file on the fly

 tar -czf /dev/stdout $(DIRECTORY_OR_FILE_TO_COMPRESS) | split -d -b $(CHUNK_SIZE_IN_BYTES) - $(FILE_NAME_PREFIX)

putting them together agian

 cat $(FILE_NAME_PREFIX)* >> /dev/stdout | tar -xzf /dev/stdin
tips/threelinestip.1205339198.txt.gz · Last modified: 2009/05/25 00:34 (external edit)
CC Attribution-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0 ipv6 ready