Tag Archive | "Unix"

Synchronise 2 Laptops and Desktops with Unison Free Synchronization Software

Monday, November 5, 2007

2 Comments

I have a laptop and a desktop, and one of the problems that I faced was to get my files synchronized. I work on my desktop while I’m at home, and on the go, I rely on my laptop. However, I need my files to be the same on both laptop and desktop. In the [...]

Continue reading...

Recursively Download Folders using FTP with wget in UNIX (even SSH)

Monday, October 15, 2007

3 Comments

Okay, so you don’t have SSH access to your server, but you do have FTP access to it, and you need *all* the files in a folder. Worse, your directory structure is many levels deep, and extremely messy. Normal FTP won’t cut it, because command-line FTP doesn’t do recursive downloading of folders. Turning off interactive [...]

Continue reading...

Running UNIX commands in your Java application

Tuesday, July 3, 2007

0 Comments

I was looking around for a method to run commands from the prompt automatically from within my Java application, and then I found it. Here’s the solution – and it works like a charm! static void doExec1() throws IOException { // use pipes and I/O redirection // but without using a shell Runtime runtime = [...]

Continue reading...

Example FTP Session in UNIX

Sunday, May 20, 2007

1 Comment

UNIX has a very powerful command line interface, and one of the things that you can do is remotely access a UNIX server. FTP is one such remote protocol that allows for the transfer of files easily. This FTP example shows how to copy, rename, and delete files. ftp alvinpoh.com This just means you want [...]

Continue reading...

Common Useful UNIX Commands

Sunday, May 20, 2007

0 Comments

If you’re new to UNIX-based systems (e.g. Linux), the interface can be daunting, especially since there’s no GUI, and you might need to use the shell command line interface to remotely access a computer. There are a few basic UNIX commands for performing common tasks that you should know of, which allows you to navigate [...]

Continue reading...

Bash and Zsh Keyboard Shortcuts

Monday, May 14, 2007

0 Comments

Keyboard shortcuts save steps and knowing these few shortcuts when working on the command-line can save a lot of time and typing. Ctrl-A: Moves to the beginning of the current line Ctrl-E: Moves to the end of the current line Alt-F: Moves the cursor forward one word on the current line Alt-B: Moves the cursor [...]

Continue reading...