Thursday, October 6, 2011

Recursively dos2unix....

Recusrsively dos2unix for all file in the current folder and all subfolders....

find ./ -type f -exec dos2unix '{}' \;



Bye...

Search and replace a string, recursively..... under linux

Under linux.....

sed -i 's/stringA/stringB/g' *
 
replace stringA with stringB in all files under current directory....
Recursively way.....
find ./ -type f -exec sed -i 's/stringA/stringB/g' '{}' \; 
 
Bye... 

apt-get through proxy server under Debian

Declare and export http_proxy and ftp_proxy into /etc/bash.bashrc

FTP_PROXY=http://your_net_account_username:your_net_account_password@proxy_host:proxy_port
HTTP_PROXY=http://your_net_account_username:your_net_account_password@proxy_host:proxy_port
export FTP_PROXY
export HTTP_PROXY


Open new console.... and you're ready....

Bye..