Set proxy in bash

export http_proxy=”http://ip:port” ie: export http_proxy=”127.0.0.1:7070″

read more

yum update problem “[Errno -1] repomd.xml does not match metalink for updates Trying other mirror.“

MirrorManager is a piece of SW Fedora/RedHat utilizes to provide yum with the lists of mirrors to yum. I.e., “MirrorManager not working correctly”, in this case means yum on a users’s system receives incorrect data. On the user side, one way to work around the effects of this defect is to remove the metadata files your yum caches. E.g. by using “yum clean < ...all,metadata>” or by brute force: # rm -f /var/cache/yum/updates/{*xml*,*sql*,*cookie} and to rerun “yum update”.

read more

HowTo: UNIX / Linux Open TCP / UDP Ports

You can use the netstat command: netstat -tulpn netstat -nat | grep LISTEN

read more

Search and Replace in all files within a folder recursively on Linux/Unix

In order to search recursively through directories, looking in all the files for a particular string, then to replace that string with something else (on linux/Unix), these commands should work (Where string1 is the original string and string2 is the replace-string): find ./ -type f -exec sed -i ‘s/string1/string2/’ {} \; It would have been better to use xargs instead of -exec. Using xargs, you will fork fewer times. For large numbers of files, that means you will be done faster. In other words: find ./ -type f | xargs sed -i 's/string1/string2/' Instead of editing all files...

read more

Trash works on NTFS when mounted by Nautilus, but not when automounted via /etc/fstab

read more