I’ve been having trouble connection to a few of my clients FTP servers while I’ve been freelancing in China. So I looked around for a simple way to proxy my FTP connections. If you have a linux/mac server you can proxy through it. I used my Free Amazon EC2 Server.
All you need to do is run this on your local box.
ssh -D 9999 ##HOSTNAME##
Then in ftp client instruct it to use a SOCK5 server
It’s that easy!
Btw, you can do this on windows almost as easy, you just need to use Putty for the ssh command part. Checkout this nice blog post from Chris Swan for information about using Putty.
A easy way to mount network drives from either a windows box or a linux samba share is to use the net use command in your cmd.exe prompt.
Open your run prompt by holding down your windows key + R
type in cmd
net use g: \\hostname\shareName
You can substitue the drive letter g with any open drive letter on your system. the hostname can either be a hostname or an ip address like this.
net use g: \\192.168.1.100\shareName
You then should be prompt to enter a username and password if the share is password protected. If everything works correctly then you should get the “The command completed successfully.” message and you should now see your drive show up under “My Computer”
Tar is format of choice for archiving and compressing files on linux. It’s pretty simple.
Creating a Tarball
tar -czvf test.tar.gz test
tar -cjvf test.tar.bz2 test
Unpacking a Tarball
tar -xzvf test.tar.gz
tar -xjvf test.tar.bz2
c = create
z = gzip
j = bzip2
v = verbose
f = file
x = extract
You notice I give two different options, the difference is czvf vs cjvf, which is just the compression method. I usually use gzip, but both are pretty close to each other. From what I’ve heard bzip2 will give you better compression (about 15%) but is a little slower at compressing and decompressing.
There are two ways I now how to find files, I like to use updatedb/locate the best, but the find command is more commonly installed.
updatedb / locate
find -name testfilename.txt
updatedb /locate is much faster because it uses a database to cache all the files on your system, but it needs to constantly be updated either manually or by cron. Where as find is much slower but also is up to date.
It allows you to seemless cover your own ass… It is also very useful for transfering, and updating code. Trac is also very cool, it has one of the best bug tracking sytems, a cool wiki, and a subversion browser. Here is a tutorial about how to setup these up on a fedora/redhat server… It’s pretty easy…