The shutdown command comes in handy if you want to shutdown or reboot your Mac at a specific time. Here are some of the examples. You should be a super user to use these commands.
sudo shutdown [options] when [message]
Some examples.
Shutdown immediately:
Reboot immediately:
Shutdown at 9 pm:
Shutdown in 5 minutes:
Restart immediately
Shutdown immediately
Recently quite a number of forum members asked about how to transfer large file between remote locations. The online services such as DropBox and Wuala do a good job but if you already have a Mac or a Linux machine, it is so much easier and also secure to setup your own FTP (File Transfer Protocol) server using vsftpd (Very Secure File Transfer Protocol Daemon). In this article I will try to guide you through the entire setup process. Lets get started, shall we?
- First you need to install the vsftpd using Mac Ports. Open the Terminal.app, enter the following command and hit Enter. If you don’t have Mac Ports installed, get it from here.
- Now you have to create a vsftpd.config file which defines the rules to secure your ftp server. Fortunately, when you install vsftpd using Mac Ports, it will create a sample config file at /opt/local/etc/ directory. Use the following command to create a config file from the sample file.
sudo cp /opt/local/etc/vsftpd.config.sample /opt/local/etc/vsftpd.config
- Open the vsftpd.config file on any editor and make the following changes.
sudo vim /opt/local/etc/vsftpd.config
To deny access to anonymous users, activate
anonymous_enable=NO
To allow local users to access their home directories
local_enable=YES
Add a welcome message
ftpd_banner=Welcome to my FTP service!
Lock the users in their root directories
chroot_local_user=YES
There are several other settings you could activate/deactivate on the config file. Do as it fits.
- To run the server, use the following command
sudo /opt/local/sbin/vsftpd
If you have done everything correctly so far the server should be up and running.
- To do an initial test try the following command in a separate tab.
Replace the ip address with your local ip address.
This should ask you for a user name and password. Try the user name and the password you use for log-in to your Mac.
- Next step is to enable users to access your newly setup FTP server from a remote location. For this you need a service such as DynDNS or No-IP. You can sign-up for a free account with both providers. Once the registration is completed, go ahead and add a new host as shown in the following example.

Do not forget to activate the service.
If you have done everything correctly, you should be able to connect to the newly set up ftp server from any remote location.
In case if you have a router in your home network don’t forget to do a port forward.
That’s all. 
Let me know how it went.
If you haven’t discovered yet, there is nice OS X hidden gem called screen capture, which could be quit useful taking snapshots of your screen. If you want to take a screen shot of the full screen press Command + Shift + 3. For a selected area, press Command + Shift + 4 and highlight the area. By default the images are saved in PNG format. If you want to change the format type the appropriate command in the Terminal.app and press enter. Here are some examples.
defaults write com.apple.screencapture type pdf
defaults write com.apple.screencapture type png
defaults write com.apple.screencapture type jpg
defaults write com.apple.screencapture type tif
You may have to restart the Mac to take the command into effect.
If you are using certain commands on the Terminal.app in a regular basis, it is a good ideal to create aliases to increase your productivity. Here is how you do it.
- Open the Terminal.app from Applications > Utilities > Terminal.app
- To create/Open .bashrc, type
- Press i to change vim to edit mode and go the the end of the file.
- Add any aliases you like as shown below
alias v='vim'
alias lla ='ls -al'
alias ..='cd ..'
alias ...='cd .. ; cd ..'
- Press Esc, type :wq to save and exit vim.
- To see all your existing aliases, type
and press enter.
Happy coding!
If you are comfortable using the Terminal.app here are some examples of how you could use the find command to delete multiple files.
Delete a folder(s) in the current location including sub directories with a specific name.
find . -name "Folder Name" -exec rm -rf {} \;
Delete file(s) in the current folder with specific name.
find . -name "File Name" -exec rm -f {} \;
You can extend the above commands with wildcards it more flexible.
Delete files with the extension “.txt”.
find . -name "*.txt" -exec rm -f {} \;
Please be aware that this method does not give you any prior warning. If you want to confirm before deleting, try the following command.
find . -name "File Name" -exec rm -i {} \;
The terminal is a powerful application. By executing commands with wrong parameters can cause unexpected trouble. Therefore use it with caution.
I got fedup with the Apple’s default terminal and the color sheme for that matter. If you are spending lot of time on the Terminal perhaps it is a good idea to look for a good theme.
Check out the theme from this website.
Recently, I have installed wireshark using Macport. When I tried to start the service as a normal user I get this annoying message, “dumpcap: There are no interfaces on which a capture can be done”. Apparently, it has something to do with the permissions. If you want to access the network hardware you should execute the wireshark command as a super user.
$sudo <Super User Name> wireshark
should do the trick.
Since Apple released Leopard a while back, the Ruby on Rails team has released several updates. Here are the commands to update the Rails on the terminal.
$ sudo gem update --system
$ sudo gem install rails
$ sudo gem update rake
Happy Railing!
Recently, I have decided to install Leopard (10.5) on my iMac. Instead of upgrading I have formatted the HDD with Mac OS Extended (case-sensitive) option only to find out that this would prevent me from installing Adobe CS4. I had to do a complete reinstall since it was not possible to change the file system format after installing the operating system. If you already have installed the OS (has the same problem as I am) and do not want to reinstall, create a clone using SuperDuper! or Carbon Copy Cloner. Then you can use the Installation DVD to format the drive. Make sure it is Mac OS Extended (Journaled) this time. When its done, start the Mac from the cloned drive and copy everything back to the newly formatted HDD.
Finiteloops.com wishes a Happy New Year 2009 to all the visitors!
It’s been a long time since I posted any news here. Since the previous post, many new products have been introduced by Apple and it has been an exciting time for all the Apple fans. One of the most interesting products for me is the recently introduced Macbook (Alu). It fits my budget and offers some of the best features of its class. The new graphic processor from NVidia (NVIDIA GeForce 9400M) provides enough power to do most of the daily tasks on this beautifully designed machine without a compromise. The battery life is nearly 4.5 hours. It may take some time to get used to the glass trackpad, however once accustomed it is so nice to click on.
The 13’3 glossy screen provides 1280×800 native resolution and with a external monitor upto 2560×1600.
For more technical specifications, please visit apple.com.
Apart from the hardware upgrades, Apple also released iWork 09 (Microsoft Office alternative) and will be releasing iLife 09 during the coming weeks.