There are several ways you can access a Mac HDD from Windows PC. If you have a Mac and a PC you can activate the File Sharing in System Preferences on your Mac and you are ready to go. The Mac should appear under network. You can make the process easier by mapping the network drive.
If you don’t have access to a Mac but want to connect to a HFS+ formatted HDD, there are two possibilities.
- Read only access
Download the HFSExplorer from catacombae. To mount the HFS+ partition you should select the “Run HFSExplorer in Administrator mode”. As mentioned above this tool can only read.
- Read and write access
MacDrive7(MacDrive 8 is coming soon) is a commercial software that can both read and write a HFS+ formatted HDD. You can download a trial version from their website.
Rsync is a fast and extraordinarily versatile file copying tool. It can copy locally, to/from another host over any remote shell, or to/from a remote rsync daemon. It offers a large number of options that control every aspect of its behavior and permit very flexible specification of the set of files to be copied. It is famous for its delta-transfer algorithm, which reduces the amount of data sent over the network by sending only the differences between the source files and the existing files in the destination. Rsync is widely used for backups and mirroring and as an improved copy command for everyday use.
Rsync finds files that need to be transferred using a “quick check” algorithm (by default) that looks for files that have changed in size or in last-modified time. Any changes in the other preserved attributes (as requested by options) are made on the destination file directly when the quick check indicates that the file’s data does not need to be updated.
By combining rsync with ssh it is really easy to securely synchronize folders.
To sync a remote folder with a local folder, use the following command.
rsync -avze ssh /localpath(source)/ user@remoteaddress:/remotepath/(destination)
Note that this will update the remote path not the other way around.
rsync -avze ssh /User/john/Documents/ firstname.lastname@example.org:/home/me/Documents/
The above method won’t remove any files existing on the remote path, which are not on the local path. If you also want to remove files/folders if they are not existing on the local path, use the following command.
rsync -avze ssh --delete /localpath/ user@remoteaddress:/remotepath/
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]
Shutdown at 9 pm:
Shutdown in 5 minutes:
If you are not an admin user non of the above commands are going to help. If that’s the case try the following commands.
osascript -e 'tell application "System Events" to shut down'
osascript -e 'tell application "System Events" to restart'
osascript -e 'tell application "System Events" to sleep'
osascript -e 'tell application "System Events" to log out'
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
To allow local users to access their home directories
Add a welcome message
ftpd_banner=Welcome to my FTP service!
Lock the users in their root directories
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
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.
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 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.