iOS Developer Programs Explained

Most people who first venture off into App Development focus their efforts on the design of the App & its implementation. However, when the time to publish the app comes along then there are questions as to which developer program he/she should opt for.

Developer programs are online accounts created by Apple for the developer community. Each developer can register their own account from where they can manage the distribution of their apps, the collection of payments for purchase of apps or items within the app. The different programs offered are meant to cater to a specific audience set.

There are 4 different types of developer programs.

  • Free Membership
  • iOS Developer Program
  • Enterprise Developer Program
  • University Developer Program

Free Membership

This is the simplest program. Anyone can enrol for this & there is no cost involved. To sign up simply go to developer.apple.com & register. This is the perfect program for those looking to start iOS App Development. It gives the member full access to the latest guides, sample codes & information about the different classes & frameworks used for the current publicly available version of iOS.

iOS Developer Program

The iOS Developer Program is the paid version of the program. It costs $99 a year & is meant for those who wish to distribute apps on the App store. Apart from distribution it also gives the user options to test it on their own device. All the benefits from the Free Membership are also made available here.

Enterprise Developer Program

The Enterprise Developer Program is another paid program. It costs $299 a year & is meant for organisations who wish to distribute apps within the organisation to their own employees. The big difference between this program and the regular iOS Developer Program is the fact that in the Enterprise Program you have full control over how your apps are distributed to your employees & have to take care of the hosting as well as distribution aspects. The apps made by an organisation do not go onto the app store & are not verified by Apple.

University Developer Program

The University Developer Program is a free developer program meant for Universities or colleges. This program allows such educational institutes to test the apps made by students as part of the official curriculum. Limited distribution amongst students is also permitted. The program lacks the ability to perform large scale distribution or distribution on the App store.

The table below illustrates the different  facilities made available to different account holders.

devProg

For more information related to the D-U-N-S Number:

Making a case for OS X Server

Almost everyone is aware of the OS running on Apple Computers. Its called OS X & each version gets a name from a location in California (they used cat names earlier). But what is little know is about the Server that is also made available from Apple. Its called as OS X Server. Not only is it little know but it is also under utilised. I am going to make a case for using this product as compared to some of the other solutions that are available out there.

Installing

Firstly, lets talk about getting hold os OS X Server. Earlier there used to be a dedicated version of the OS which was made available for the server. But starting OS X 10.7 (Lion) that approach was discontinued. If you wanted an OS X Server, you would have to first upgrade your Mac to the consumer version of the OS & then install the Server.app. All you have to do This greatly simplified the whole process of setting your Mac up as a server.

The big advantage with this is that you no longer need to purchase a separate “server” version of the OS.  The other big advantage is that all the services being offered by the server are no located in a single application, in a nice collected manner.

Requirements

Typically most servers require an advanced hardware configuration to run. This is also the case for OS X Server. The recommended products for this would be the Mac Pro or the Mac Mini Server. The Mac Mini Server is a Mac Mini that comes with the Server App included as a part of the setup. This is a product configured to be used as a server. While the 2 products mentioned above are ones used most frequently as a server, you are not limited to them. Any Mac with a minimum of 10GB storage space & 2GB of RAM can run OS X Server. Though in reality you would need much larger specs than the ones mentioned above.

Services Offered

The OS X Server works best in an all Apple product environment. However, it also works well in mixed environments too. Especially when it comes to managing Macs & iOS Devices while taking advantage of other services being offered. In fact, a solution commonly used is the “Magic Triangle” which allows you to used an Active Directory Server along with OS X Server.

Basic Networking Services

Basics Networking Services such as DNS, DHCP, VPN are easily available & configured. Most of them don’t require a lot of configuring to do. Also the Caching Service & Software Update services can also be easily configured for managing the bandwidth usage in the organisation.

Collaboration & Communication

As a part of the collaboration & communication services provided you have the ability to host your own Mail service, Messages service, Website service, Wiki service, Calendar & Contacts Service.

Sharing

The file sharing service & ftp services are available for users to more easily share files & folders across the network.

Management

From a device management point of view there are plenty of services available. You have the Netinstall service which allows you to remote install OS X over the network or allow clients to boot using an image which is hosted on the server. Then there is the Open Directory Service which allows the management of various user accounts over the network. These users accounts then work along with the Time Machine service, which allows you to back up a Mac onto the server itself. Finally, the Profile Manager service works along with the domain users to provide device management for the different devices (OS X & iOS Devices).

Tools

Server App

LINK:https://itunes.apple.com/in/app/os-x-server/id714547929?mt=12
This is the main app that you will use to configure the different services that your server will be offering. The advantage with the app is it also allows you to remotely administer your server using the app itself.

Workgroup Manager

LINK:http://support.apple.com/kb/dl1698
The Workgroup Manager is a utility which can be downloaded from Apple’s support page. This application was used to create users & groups & apply managed preferences to them for earlier versions of the server. It is possible to create users & groups for the current version of the server using this app.

System Image Utility

This tool is required to create the different types of NetInstall images which are used for mass deployment. All OS X computers come with this application preinstalled.

Directory Utility

This utility also comes built into the OS & is used while binding your Mac to a Directory Service.

Apple Remote Desktop

LINK:https://itunes.apple.com/in/app/apple-remote-desktop/id409907375?mt=12
This is a very powerful tool. Available on the Mac App Store as a paid app. This tool allows you to remotely monitor & administer all the Macs within your organisation. It has many report generation tools to help in the management of your Macs.

Apple Configurator

LINK:https://itunes.apple.com/in/app/apple-configurator/id434433123?mt=12
This is another application available on the app store. This is a free app to configure different iOS Devices. It is used to perform a manual configuration of the devices.

Ticket Viewer

The Ticket Viewer Application is a built in application that is used to help in examining tickets used under kerberos.

Recovery Disk Assistant

LINK:http://support.apple.com/kb/dl1433
A free tool that is available online which allows an administrator to create an external bootable recovery drive to perform various troubleshooting tasks. OS X: About Recovery Disk Assistant

Disk Utility

This is a built in utility that is used to maintain different storage devices. It allows you to partition & format various drives.

Why to use the OS X Server

There are many reasons why an OS X Server would make a good option.

  • Cost: The cost of OS X Server itself is low. The hardware for running OS X Server would ideally be the Mac Mini which starts around $999 (including the Server App itself). If you already have a Mac with you, you just need to purchase the Server App for $20. This is ideal for organisations on a budget.
  • Simplicity: The Server is very easy to configure. Many of the services being provided are extremely easy to configure & maintain. From an administrators point of view, it involves providing basic information & a few clicks.
  • Features: The Server provides many basic services used everyday & many administrative options that combine the power of modern day servers with the simplicity needed.
  • Works well along with other Servers such Windows Server.

Ideal Situations to use OS X Server

The OS X Server is ideal for small organisations which use Mac or iOS Devices. The low cost & simplicity makes it an ideal choice for such organisations. Also if you are an organisation which uses a lot of Macs & iOS Devices then managing them is a lot easier with OS X Server, here again the cost & simplicity ensures that it is a viable option.

The server may not be a good choice for organisations with a very large user base or very few Mac/iOS devices. While other computers can easily work with OS X Server, other Servers may prove much better for such scenarios.

Here are some points to consider while deciding whether to use an OS X Server.

  • Does your organisation use a lot of Macs &/or iOS Devices?
  • Do you need to perform various administrative & configuration tasks on your Apple devices?
  • Is your user base small? Approximately 10 – 150 odd employees?
  • Do you need to provide very basic services without worrying too much about platforms being used? (Especially if directory services are not required).

If the answer to a combination of questions above is Yes, then the OS X Server might be the right choice for you.

Below are a list of some scenarios where the OS X Server might be ideal

  • Small Medium Enterprises
  • Schools & Educational Institutions
  • All Mac & iOS Environments
  • Home

Conclusion

The OS X Server is best if you are predominantly using Apple computers & mobile devices. The ability to manage them & configure them is best served by the Server app. However, for larger organisations this may not be the only criteria. The server can work along with windows server, however, most Apple computers & mobile devices can also work with other solutions.

If cost is a major consideration & simplicity is a must then the OS X Server is a good bet. If you are looking for a feature heavy server which offers a wide variety of services with lots of room for customisation then this might not be the right solution.

All in all the Server App is a very good app. It will definitely be something work considering when you are managing the IT infrastructure.

Configuring an SVN Server on OS X on your Local Network

The following post walks through the steps required to setup a simple SVN server to share files with users on the network. Note: Familiarity with Terminal Commands is required. Please go through the following blogs: Terminal Commands, Terminal Commands 2, Terminal Commands 3

Note:

The following steps illustrate the process of setting up an SVN server for a simple scenario. It can be easily scaled to handle multiple computers & users. In a real world situation you would have to deal with stronger authorisation procedures & larger networks.

 

Requirements for this demo

  • 3 Apple Computers running OS X Mavericks
  • All 3 computers should be on the same network
  • Knowledge of Terminal commands

 

Pre-setup steps

1.Decide which computer you want to setup as the SVN server. Change the hostname of the computer to SVN Server.

2.To change the hostname open System Preferences > Sharing > Click on Computer Name > Enter SVN Server.

3.Create a Share Point where you will be hosting the server. For this exercise we will be creating a separate partition & will be sharing it with other users on the network.

4.To create a new partition open Disk Utility > Select the Disk entry (not the volume entry) > Click on Partition Tab > Select the Partition you want to further partition >  Click on the ‘+’ sign > Specify the name, size & format for the partition (for this demo we will use SVN, 10 GB, Mac OS Extended Journaled) > Click Apply

5.Access authorisation for this share point will be via a sharing only user. Create to users called Employee1 & Employee2. Give them a password emp1 & emp2 respectively.

6.To create sharing only users open System Preferences > Click on Users & Groups > Click on ‘+’ sign to add new user (If necessary authenticate as an admin user to unlock) > From the drop down select Sharing User > Provide the login credentials specified above.

7.Repeat the above step for the second user.

8.Now that we have our users ready we should go ahead & setup the newly created partition for sharing.

9.Open System Preferences > Sharing > Click on File Sharing in the service list, make sure the checkbox is checked > Click the ‘+’ sign under ‘Shared Folders’, add the newly created partition > Under the ‘Users’ list add the newly created sharing users Employee1 & Employee2, remove all other users except Admin > Give the admin user, Employee1 & Employee2 Read-write access & Everyone No Access.

10.Create a folder called ImportFolder in the Documents folder.

cd ~/Documents 

mkdir ImportFolder

  11.  Now that we have prepared the server computer, test the new shared folders from the other 2  computers (which will be used by Employee1 & Employee2).

 

Setting up the svn server

Perform these steps on the SVN Server machine

  1. Create a folder called SVNRepository in the newly created partition: mkdir SVNRepository
  2. Run the command to give admin privileges: sudo chgrp -R admin /Volumes/SVN/SVNRepository/
  3. Create the svn repository. For this exercise lets call the repository as DocumentsRepository.   svnadmin create /SVN/SVNRepository/DocumentsRepository
  4. The next few steps involve configuring the settings for your server.
    1. Enter the /SVN/SVNRepository/DocumentsRepository folder cd /SVN/SVNRepository/DocumentsRepository.
    2. Enter the conf folder. cd conf
    3. Edit the svnserver.conf file.
      1. Edit the following elements in the file, make sure that there is no white space before the line.
      2. anon-access = read //this means no authentication is required to read
      3. auth-access = write
      4. password-db = passwd
      5. Save the file.
    4. Edit the passwd file.
      1. Edit the following elements in the file.
      2. Under users add the following users.
      3. employee1 = password1
      4. employee2 = password2 (Note: For a real world implementation make sure that you use stronger authentication methods for your server.)
      5. Add as many users as you wish.
      6. Save the file.
  5. Start the svnserver (as root) using the following command: sudo /usr/bin/svnserver -daemon -root /SVN/SVNRepositories
  6. Navigate to the folder where all your data is located
    1. cd ~/Documents/ImportFolder
    2. Run the import command to add the files to your repository.
    3. sudo svn import . file://SVN/SVNRepository/DocumentsRepository/ -m “Initial Checkin”
  7. This has setup your svn server with some initial data in it.
  8. Now we perform a sanity check to make sure that all is working well.
    1. cd ~/Documents/
    2. mkdir Test (This is the folder where we will check-out the files from the server)
    3. svn co svn://<ip address of your server>/DocumentsRepository
    4. This should check-out all the files from the repository into your folder.
    5. Check to make sure that all the files were checked out.
  9. If all went ok, then you server is up & ready.

 

Testing the svn process from the 2 different computers

We are now ready to test this on different computers.

  1. Make sure the computer for Employee1 is on the same network.
  2. Open Finder & Browse for the Network partition being shared by the server.
  3. Mount the shared volume in Finder. Authenticate using Employee1’s sharing user credentials if necessary.
  4. Open the Terminal application.
  5. Navigate to the Document’s folder: cd ~/Documents
  6. Create a project folder: mkdir Project.
  7. Navigate to the Project folder: cd Project.
  8. Now we run the command to checkout files into your folder: svn co svn://<ip address of your server>/DocumentsRepository.
  9. Browse through the newly checked out files.
  10. Let us try adding a file to the repository.
    1. Create a new file using TextEdit.
      1. Open Text edit.
      2. Type “This file was created by Employee 1”.
      3. Save the file as Employee_1_Report in the ~/Documents/SVNRepository/DocumentsRepository folder.
    2. Now run the command svn add Employee_1_Report.
    3. Lets commit the changes to the repository: svn ci —message “Adding new file” Employee_1_Report
    4. If prompted to authenticate enter the details you specified in the passwd  file employee1 as the username & password1 as the password.
  11. Now you have added a file to repository from your client machine.
  12. Repeat steps 1 – 9 for Employee2 from a different machine.
  13. Verify that files added from one machine appear on the other.
  14. Thats it. You now have a working svn-server on your local area network.
  15. You can try adding & editing files to check if the changes reflect on both the computers.

 

Terminal Commands – Part 3

This post follows up on the previous 2 posts. Here we will look at some advanced commands. Note that this is by no means a comprehensive list. You can visit the online version of the man pages: Apple Man Pages

Here are the links for the previous posts.

Terminal Commands – Part 1

Terminal Commands – Part 2

The commands are explained with some common tasks in mind. Some of the steps are there to illustrate the usage of the commands. To find out other tasks that can be performed using these commands simply refer to the man pages.

FILE SYSTEM

diskutil

The diskutil command is a handy tool to run disk utility via the terminal. A full list of tasks that can be executed are available via the man command.

Example:

There could be situations where you have encrypted your USB drive & have forgotten the password for the same. While there is no way to retrieve the data, it is still possible for you to use the USB disk. Let’s use the diskutil command to do this.

– Launch terminal

– Make sure that the USB is properly connected

– Run the command diskutil cs list

– This lists all the core-storages that are connected to your system.

– Next to the Logical Volume Group select the alphanumeric id & copy it (make sure you select the correct logical volume group).

– Type the command diskutil cs delete <id>

– Replace the id with the alphanumerics id you copied earlier.

– This will completely remove the encrypted partition. As mentioned earlier you will loose all the data that is already there on the partition.

diskutil man page

fsck

File System Check command. This command is used to check different Filesystems by invoking the corresponding sub command.

fsck man page

hdiutil

hdiutil is used to perform some other tasks related to storage devices. A good example of this is the creation of different kinds of disk images.

Example:
Let us create a disk image for the ~/Documents directory

– Launch the terminal application

cd ~/

mkdir ImageDemo

hdiutil create -srcfolder ImageDemo ImageDemo.dmg

Apart from the above example, there are a lot of other tasks that can be performed using hdiutil. For full information run the man command.

hdiutil man page

mount

The mount command is used to mount a volume via the terminal. A volume can be mounted as a Read-Write or a read only. For full details on the functionality run the man mount command

Syntax: mount <options> <volume location>

mount man page

GETTING INFORMATION RELATED TO THE SYSTEM & FILES

uptime

Shows how long the system has been running.

uptime man page

ioreg

Get information out of the io registry.

Example:
Suppose we want to get information about the serial number. We would use the ioreg command.

– launch terminal

cd ~/Documents

ioreg -l | grep “IOPlatformSerialNumber”

Optionally you can pipe the information to a file & read it later.

ioreg man page

system_profiler

Used to get system related information. it can generate a small or a detailed report depending on what option is used. For full information access the man pages for the command.

system_profiler man page

top

Displays information about the various processes running within the system including the usage 7 state. To get more information about the full functionality visit the man pages.

top man page

METADATA

mdls

Used to get the metadata for a given file or folder. The data is displayed on the screen.

mdls man page

mdutil

Manages spotlight search indexes.

mdutil man page

NETWORKING

networksetup

This command is used to access the information that is found within the System Preferences > Network Preferences pane.

You can use this command to do some quick command line configuration of the network settings.

A good example is to manually configure the settings while booted in the OS X Recovery partition. Here is an Apple Support Document which talks about the same.

http://support.apple.com/kb/HT5034?viewlocale=en_US

networksetup man page

MISCELLANEOUS

tar

Used to compress file(s) into a single tar file or decompress.

Example:

This example demonstrates how to use the tar command.

– Launch terminal

cd ~/Documents

mkdir Docs

cd Docs

echo “A” | cat > file1

echo “A” | cat > file2

echo “A” | cat > file3

echo “A” | cat > file4

Now to compress all the files

tar -cvf compressedFiles.tar file*

To uncompress them all

tar -xvf compressedFiles.tar

tar man page

tmutil

Manage Time machine from the terminal. Useful command to manage time machine from the command line.

tmutil man page

fdesetup

Used to mange file-vault from the command line

fdesetup man page

Terminal Commands for OS X – Part 2

Continuing from the previous post on.

RENAMING FILES & FOLDERS
The way files/folders are renamed is by using the mv command. In the mv command make sure that the destination folder is the same as the source folder for your target, its just the target name that changes.

So if we have a folder called Documents & inside it we have a folder called Files. To rename Files to OfficeFiles we run the following command.

mv Files OfficeFiles

MODIFYING PERMISSIONS
Top modify the basic UNIX or POSIX permissions on a Mac we need to use the chmod command. The standard permissions apply to Users, Group & Everyone else. Each of these entities has 3 flags assigned to it: rwx Read-Write-Execute. Each flag is a boolean flag holding either true or false, indicated by 1 or 0.

So for example if we wanted to modify the permissions of the OfficeFiles folder to be read-write only for the user & read only for group & everyone else then the command would need the following information.
User: rwx = 110 -> 6
Group: rwx = 000 -> 0
Everyone else: rwx = 000 -> 0

So the command would look like: chmod 600 OfficeFiles
FOLDER PATHS & NAVIGATING FOLDERS
A good understanding of the folder structure within a Mac is necessary while dealing with terminal commands.
All folders with the Mac begin at root indicated by ‘/’
Root contains the following folders
Applications
Library
Systems
Users

rootFolderMost of the work that is done is done within the Users folder. In most cases users would not need to go to the other folders for their day to day work.

homeFolder

As you can see from the screenshots, the terminal shows more folders than are visible through finder.

rootFolderInTerminal

homeFolderInTerminal

Within the Users folder all the Home Folders for the different users on the machine are listed. Again, users typically have access only to their own login folder.

Each users Home Folder contains the following Folders
Documents
Downloads
Music
Pictures
Public
Desktop

Depending on your usage you may see a different view from the one shown below.

The following are some examples of navigating the File System.

1)Accessing the root folder

cd /

2)Accessing the home folder. Example home folder called admin

cd /Users/<home folder name>

cd /Users/admin

or cd ~/

NOTE: the ‘~/’ is a shortcut for accessing the home folder directly. Using the shortcut access will only be given to the home folder for the user currently logged in.

3)To access the OfficeFiles folder

cd ~/Documents/OfficeFiles

or

cd /Users/admin/Documents/OfficeFiles
EDITORS
There are a number of built in editors available within the Mac. Apart from TextEdit, which is a GUI based editor, there are many editors available for direct use from the terminal too.

Emacs:
Emacs is a basic text editor that is built into the mac. There are various versions available but those may not be built in. You may need to download them manually.

Here are some common emacs commands to perform operations. For an even bigger list visit http://www.cse.iitb.ac.in/~br/courses/cs699-autumn2013/refs/emacs-commands2.html

http://www.gnu.org/software/emacs/manual/html_mono/emacs.html#Commands

Vi:
This is yet another editor that is built into most UNIX like OS. This is the editor that is used when running the less or more commands.

Here are some common commands used in Vi.
http://www.tutorialspoint.com/unix/unix-vi-editor.htm

Apart from this there are other editors such as gedit & xemacs which has a GUI interface.

NETWORKING RELATED TERMINAL COMMANDS
1)ping
Used to test connectivity to a particular IP address
ping http://www.google.com

2)traceroute
Used to check the hop trace between your machine & destination
traceroute http://www.google.com

3)ipconfig
Used to get network interface related information
ipconfig getoption en1 <option>
There is a lot more information that can be gleaned using ipconfig. For a full list run the man command for ipconfig

4)ifconfig
Used to configure ifnormation related to network interface
ifconfig en0 inet <ip address> netmask <subnet mask>

5)lookup
There are different ways to get the forward & reverse lookup to happen
nslookup <domain name>
nslookup <ip address>

dig <domain name>
dig -x <ip address>
NOTE: Please use the man command to get more information.

Terminal Commands for OS X – Basic

This is the first part of the Terminal Commands topic. This article covers the basic commands which a user can use on the terminal.
To launch the terminal application simply navigate to /Applications/Utilities/Terminal. Alternatively, you can even search for the same using spotlight.

cd
This command is used to change the current directory we are. So if we want to navigate to a new folder we simply run the cd command.
Syntax:  cd <folder path>
Note that the folder path has to be the absolute path of the folder. Beginning from root. If you simply place the name for the folder, the OS is going to search for that folder within the current directory. The command won’t work if it doesn’t find the specified folder.

ls
This command is used to list the contents of the current directory.
Syntax: ls or ls <folder name>
There are a lot of switch based options available to get more detailed results.
-a shows hidden files
-l shows in a list format with more information
-r oldest entries first
-t most recently modified entries first
View the manual for more switches.

rm
This is the remove command. This command is used to remove one or more than one files &/or folders from the specified directory.
Syntax: rm <folder name>
To remove folders we need to use the -r switch.
NOTE: The rm command should be run with caution. Running the above command does not move the contents to trash. There is no way to undo the rm command. Also care must be given to the folder from which the command is run, make sure you are in the folder you wish to be in before running this command.

pwd
Present Working Directory. This command tells us the directory we are currently in.
Syntax: pwd

cp
This command is used to copy the specified file or folder to a specified location.
Syntax: cp <source file> <destination folder>
In order to copy folders we need to use the -r switch.

mv
This command is used to move files or folders to a specified location.
Syntax: mv <source file/folder> <destination folder>
This command can also be used to rename files & folders by giving a different name but keeping the destination the same. The destination folder is replaced with new name.

less
This command is used to display the contents of a file.
Syntax: less <name of file>
This command displays the contents of a file in simple text. It displays the content in a page by page format. To stop viewing the file simply type ‘q’.

chmod
This command is used to modify the ACLs of a specified file or folder.
Syntax: chmod <rwx-rwx-rwx> <file or folder name>
The rwx indicate read-write-execute permissions for the owner-group-everyone else. The permissions are given by either indicating 1 or 0 in place of each rwx. 1 indicating true, 0 indicating false. The resulting binary numbers should be replaced by their octal equivalents. So to give only the owner rwx permission on a file the command would need 111-000-000 which is 700, so the command would look like chmod 700 <file/folder name>. If we wanted to give rw permission to owner & r permission for group & everyone else then the command would look like 110-100-100 or 644, chmod 644 <file/folder name>.

mkdir
This command is used to create a directory in the current working directory.
Syntax: mkdir <directory/folder name>
This will create a directory in the present working directory. Do keep track of the current directory before creating a new one, to make sure you are creating it in the correct directory.

sudo
Super User Do.
Syntax: sudo <command to be executed by super user>
This command is used as a prefix before other commands when we want those commands to be executed as a super user (aka root user). You are required to authenticate as an administrator for the command to work. NOTE: Do exercise caution while using the sudo command. Root users don’t have the built is permission checks & security checks. Improper usage of sudo may leave your machine in an unusable state.

man
Terminal command manual.
Syntax: man <terminal command>
This command is used to open the manual for the different commands that are available within the system. It is a good starting point to understand the full functionality of the different commands along with examples of usage.

cat
The cat command is used to perform 3 different tasks: Display text files, copy text files, combine text files, create new text files.
Display Text Files
Syntax: cat <file name>
This will display the text files on the screen.

Copy Text Files
Syntax: cat <first file name> > <second file name>
This will copy the contents of the first file to the second file using the redirect ‘>’ operator.

Combine Text Files
Syntax: cat <first file name> <second file name> > <third file name>
This will combine the contents of the 2 files & save it in the third file.

Create New Files
Syntax: cat > <filename>
This will create a new file.

echo
Display given sentence on the screen.
Syntax: echo <sentence>

grep
Used to find a particular string within a file
Syntax: grep <string pattern> <file name>
This will look for the given string pattern in the specified file. You can use different switch options to modify your result. View the man pages for the same.

find
The find command is used to find files within the system.
Syntax: find <search path> <search criteria> <name of the file> <operation to perform>
Search path – specifies the folder where we want to search
Search Criteria – specifies what to search eg: name
Name of File – name of file to search
Operation to perform – how to show the results

Sign PDF Documents in Preview on a Mac

One often encounters a situation where we would like to sign a document that we have received over email & send it across back. Or it may just be the case that we have created a PDF document & now need to sign it & send it back. This post illustrates how we can do this without printing the document.

This feature is built into the ‘Preview’ application. There may be other applications that do this, but the advantage that ‘Preview’ has over other applications is that it is built into the OS.

The first step is to create a whole new signature that is saved with ‘Preview’

  1. Open the ‘Preview’ application.
  2. Launch the preferences window. This can be done using the comma keys or by clicking on Preview > Preferences in the toolbar, which is located at the topmost corner of the screen.1
  3. Click on the signatures tab.2
  4. Click on the create signature button.3
  5. You will see a window for capturing the signature that comes up. This window turns on the built-in iSight camera for capturing the signature.4
  6. Sign the signature you want on a blank white paper. Hold the white paper in such a way that the signature appears just above the white line. You should see a preview in the signature preview window.7
  7. Once you are satisfied with the signature preview click the accept button. You should see your signature listed in the signature tab. More signatures can be added if needed.9

Thats it. Now you have successfully added a signature to the ‘Preview’ application.

Now that we have added the signature lets use it.

  1. Open a PDF document in ‘Preview’.5
  2. In the toolbar located at the top of the screen click Tools > Annotate > Signature. A new toolbar will appear.6
  3. Click on the blue ‘S’ located on the toolbar. Select the signature you want, in case you have multiple signature.
  4. Drag the crosshair arrow at the place where you want the signature. You will see your signature come up. You can fine-tune the location & size of the signature by dragging the edges or moving the image with the mouse.
  5. Once you are done. Save the document.8

Done! You have now successfully signed a PDF document. You can now do this on any other document you wish. Once you have added a signature to the ‘Preview’ application you can use it again & again.

The fading art of pens..

The fading art of pens..

Thanks to the proliferation of low cost laptops, tablets & smarphones he number of people using pens is dwindling. Its a little sad as pens are still a great way to record one’s thoughts or to write a message. I still use one loyally.