Sunday, May 31, 2009

The magic of SSH port forwarding

The problem - your department’s network won’t let you ssh or connect directly to your work Mac, you can only ssh to one special computer, and then from there you can ssh to your Mac. But, you’d like to be able to use Apple file sharing or sftp directly to your work Mac.

Well, SSH Tunneling (Port Forwarding)[sic] is great, clear, explanation of how to use SSH tunneling to directly connect to an ssh-enabled machine that doesn’t allow ssh connections from people offsite/off-campus, etc. It shows how, even when you can only access the work machine through the “gateway” machine (a situation I face here at UF), that you can setup an ssh tunnel through the gateway machine to access your work machine directly.

The best part about this? I can now use sftp (specifically fugu and its ability to edit external text files in TextWrangler) on my work quad core mac from home. I always knew this sort of thing was possible but … now at last I’ve figured out how to do it!

Update Oh, it gets so much better. Because in addition of using port 22 to forward ssh to your work machine, you can also forward port 548 (appleshare).

So, a variation on the tip from the site would be like so (where work is the Mac on your desk that has ssh and appleshare running (actually for this tip, your Mac only need be running file sharing, not ssh) and gateway is the one machine you’re allowed to ssh into from off-campus.

Code:
ssh -l myuserid -L 7778:work:548 gateway cat

Then minimize this terminal window, and then use the Finder to “Connect to Server” in the Go menu. Enter “localhost:7778? as the server address and boom, you should see the standard apple file sharing login window for your work machine. Enter your user name, password, and choose what you want to mount. Nice. (I use 7778 here, but you could use 7777. Obviously, if you use 7777 for forwarding port 22, you need to use a different port to forward 548).

Friday, May 29, 2009

Disk usage analysis

Most of us use our hard disks like closets, stuffing in files and then forgetting about them. But no matter how big a disk you have, it’s going to run out of free space one day, and running out of disk space during a system update could hurt you badly. Keeping an eye on disk usage doesn’t take much time or effort. Here are some tips and tools.

Some distributions set up cron jobs that warn you when disk usage exceeds a certain percentage. But when your usage gets flagged as high, it’s deciding what goes and what stays that takes time. Finding the right file or folder to get rid of can be a chore if you have a huge disk.

The df utility displays the disk space usage on all mounted filesystems. The -T option prints the filesystem type as well. By default, df measures the size in 1K blocks, which could be a little difficult for a desktop user to decipher. Use the -h option to get more understandable output:

$ df -h -T
Filesystem Type Size Used Avail Use% Mounted on
/dev/hda6 ext3 20G 9.3G 9.1G 51% /
/dev/hda7 reiserfs 13G 2.1G 11G 17% /mnt/suse
/dev/sda1 vfat 241M 152M 90M 63% /media/usbdisk

You can use the du command to determine which files or directories need to be deleted — or at least trimmed. A simple du will print usage for the present working directory and its subdirectories, along with the size of each directory.

The -c option prints the grand total size of the directory at the end.

The -a option also displays the file names along with directories and can be of use when you want to see a list of files in a particular directory.

The -s option will display a summary, without showing all of the subdirectories.

Wednesday, May 27, 2009

DELL XPS

Q1.) Why you chose this product? Does the product offer good value?

I chose the DELL XPS M1330 notebook 2.0 GHz, 4 GB RAM, 320GB hard disk and black color, because this product is cheaper than other people auction’s price. Other same products were dealt in $711, but what I choose only $699.
Yes, this product is giving a good value. It’s cheaper than other same product and it’s not only cheaper it’s also can save up to $300 and no sales tax. The other benefits are if you buy upon promotion it also gives you $80 cash back thru live.com and 1 year full manufacturer warranty.


Q2.) Do you simply accept as gospel truth all the good things a merchant says about their own product? Or, do you ask friends' opinions and look for independent product reviews before opening your wallet?

No, no matter how the merchant said, I will consider first, because they can says anything depend on them. I don’t think so that, they will tell me the truth. What I will do is asking friends and tries to find the product’s detail via online. Friend can give good opinion and also can give you bad opinion. For example, you ask for 2 friends’ opinion, friend A told you that product is not good enough, and got weakness, but friend B said in the other way, they said that the product is good because he/she is using now, and list down the product’s benefits for you. At that time, it will make you blur. For me, what the important is compare the product’s specifications with other brand or same brand but other products. You will get benefits if you make a lot of comparison. If want to know about the seller’s fame, you can see over their feedback from the other buyer. They always rate to the product’s seller.
In my own experience, I prefer don’t take so long time to think and do not impulse, because you will loss the chance to purchase the product and will miss out other good product. So, I will think before I buy a new product from eBay or other auction website.


Q3.) Who is your reader and what is their problem?

For the new century, many people are advocating and want to use the fashion things. For these reasons, DELL designed the new and powerful XPS M1330 high performance notebook. My reader is people who want to buy an innovative design and portability laptop. This laptop only has 1.9kg. So, it can easily bring to any place. The laptop not only light, it also has fashion modeling.
In contrast to many DELL notebooks, the XPS M1330 scores points by an elegant form. Also the tapered front edge looks beautiful. However, the design o f the hinges and the notebook’s back side are crucial for the overall appearance of the notebook. Regarding color, the XPS M1330 has a black finished trough made aluminum, roughened aluminum palm rest areas, and a black display with silver molding. The used materials and the slightly roughened surfaces contribute to the notebook’s comfortable and high-quality hap tics. The display cover is designed in the same way. To prevent the risk of object penetration between display and base unit, Dell provides a notebook bag for the XPS M1330 instead.


Q4.)What does the product promise?

The product promise that they will save up to $300 and no sales tax on this product and immediate shipping. $80 cash back thru live.com if the promotion is running. It also eligible for $17 EBAY bucks. The most important is they have 1 year full manufacturer warranty.


Q5.)How well does the product solve the problem? What does it do? How does it work?

The product is very powerful. The price is cheaper than other product and it weight is light. The laptop has wide screen and high performance. It include Intel Core 2 Duo Processor T6400, 13” wide-screen WXGA LCD display panel with Integrated 2.0 MP Webcam, fingerprint reader, 4 GB DDR2 RAM, 667 MHz, Combo DVD player, 320 GB hard disk, DELL 1390 Wireless Card, Intel Integrated video card, Standard Lithium Ion battery, McAfee 15 months virus protection.
This product is slim, light and very sexy modeling. It is a true portable machine that attracts a lot of attention. The system is very fast and has a fingerprint reader. They come with great accessories such as remote control, headphones, slip case, Manual and CD holder. And don’t forget, it’s also has a discreet graphics card. 4 GB RAM can let you do anything work you want. 320 GB hard disk can save many projects. And Dell XPS M1330 use Genuine Windows Vista® Home Basic to run the system.