Tag Archives: bash

(Bash) Download Directory with scp

download directory to localhost home folder new-dir-name

Posted in Bash | Also tagged , , | Leave a comment

(Bash) Extensible match filter example with ldapsearch

Use an extensible match filter to discover entries beneath and including a portion of the DN. Uses the older OpenLDAP ldapsearch syntax and the modern ldapsearch syntax.

Posted in Bash | Also tagged , , , , , , | Leave a comment

(Bash) Search for string in files

 

Posted in Bash | Also tagged , , , | Leave a comment

(Bash) relay files via tar+ssh+cat

rsync doesn’t like to copy files from host to host. This is sort of the “old school” unix way – tar everything to a pipe, then pipe everything out. It’s how we used to copy directories remotely before we had tools like rsync. I’m definitely open to suggestions on how to improve this (even a [...]

Posted in Bash | Also tagged , , , , , , , | Leave a comment

(Bash) Download Compressed Linode Server Image

After the system is in Finnix recovery mode set a password and start-up SSH. After that use this to compress the image on the sever side and download it locally saving bandwidth compared to a normal dd dump.

Posted in Bash | Also tagged , , , , | Leave a comment

(Bash) Enable Compositing In Metacity

check gconf-editor -> Apps -> metacity -> general -> compositing_manager Enable:  gconftool-2 -s ‘/apps/metacity/general/compositing_manager’ –type bool true Disable: gconftool-2 -s ‘/apps/metacity/general/compositing_manager’ –type bool false Enable Compositing In Metacity Posted by smoover on July 23rd, 2011

Posted in Bash | Also tagged , , , , , | Leave a comment

For loops in Bash

For loops in Bash can come in handy when for example, you want to perform bulk operations. Think of renaming all files in a directory or executing a collection of scripts. The following snippet simply iterates through a set of prime numbers and prints them to the console.

Posted in Bash | Also tagged , , , , , | Leave a comment