Ubuntu: Rsync

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 is installed in Ubuntu by default. If you need a GUI front-end, install Grsync. It is available in Ubuntu Software Center and also Synaptic package manager.

Usage:
Local backup
sudo rsync -azvv source/ destination/
Remote Backup

sudo rsync --dry-run --delete -azvv -e ssh source remoteuser@remotehost.remotedomain:/path-to-destination/
An explanation of above options to commands:
  • --dry-run This tells rsync to not actually do anything. It will just write a log of what it would do to the screen. Once you've made sure everything will work as you expect, you have to remove this option, and run the command again to perform the actual backup.
  • --delete deletes files that don't exist on the system being backed up.(Optional)
  • -a preserves the date and times, and permissions of the files (same as -rlptgoD).
  • With this option rsync will:
    • Descend recursively into all directories (-r),
    • copy symlinks as symlinks (-l),
    • preserve file permissions (-p),
    • preserve modification times (-t),
    • preserve groups (-g),
    • preserve file ownership (-o), and
    • preserve devices as devices (-D).
  • -z compresses the data
  • -vv increases the verbosity of the reporting process
  • -e specifies remote shell to use 
 Source: Ubuntu Community
If you are anything like me and spends a good amount of time on computer, your eyes may say you soon that "Hey! it's fantastic. Give me some comfort or else I'll take yours". You may soon face dry-eyes or sleeping dis-orders. Let's take some precautions to save them.
Now I'm not gonna discuss something like don't stare without blinking your eyes or maintain some distance from monitor, but here is a way to optimize your monitors brightness automatically according to the time-of-the-day and temperature.
Redshift adjusts the color temperature of your screen according to your surroundings. This may help your eyes hurt less if you are working in front of the screen at night.
To install it in Ubuntu:
sudo add-apt-repository ppa:jonls/redshift-ppa
sudo apt-get update && sudo apt-get install redshift
To start the application, first find the coordinates of your location (lat:long). Then
redshift -l lat:long (eg: redshift -l 17.033:55.20)
For latest version and also Windows installation, visit the official website.
In my previous post, I mentioned a way to handle large integers by using BigInteger. Now I'm going to provide a very important usage of it. We often use for-loop. So here is the way to use it:

Ordinary integers:
for(int i = 1; i <= n; i++) {
 //Task to do
}

BigInteger:
for (BigInteger bi = BigInteger.valueOf(1);
                bi.compareTo(n) <= 0;
                bi = bi.add(BigInteger.ONE)) {
//Task to do
}
here n is a BigInteger variable.
java

Many of you might have wondered, as I did, how to deal with integers of say more than 50 digits or so. And might have thought about breaking the integer into parts or storing it in a string and parse letter-by-letter.
Java provides a class for such large numbers: BigInteger.
You can find it in the package: java.math.BigInteger
We can do some operations like addition, subtraction, multiplication, division etc, but slightly in a different way.
For detailed information on its usage, have a look at this.
Today I tried to a new project in eclipse and on clicking
File>New> 
I found
<No Applicable Items>
I'm not able to create any kind of project. Then I found a solution on ecipse discussion group.
There are some selections in the IDE in the upper right corner; Java, JAVA EE and Resource etc. It was set to Java EE. When I selected JAVA, I can now create new projects again
Today Apple released much awaited update cum upgrade OSX Mavericks as a free update.

You can download it from App Store. Here is the list of new features:

iBooks
• Download and read books from the iBooks Store.
• Pick up right where you left off. iCloud keeps your current page up to date across all your devices.
• Swipe through Multi-Touch books with interactive features, diagrams, photos, videos, and more.
• Keep multiple books open while using other apps — great for writing a paper or doing research.

Maps
• Send directions from your Mac to your iPhone and use voice navigation when you’re on the go.
• Explore select cities in stunning, photo-realistic 3D with Flyover.
• See detailed directions, real-time traffic, and alternate routes.
• Find restaurants, stores, and other places of interest with local search in Maps.

Calendar
• Create new events in a snap with the new, streamlined event inspector.
• Enter event locations fast with address autocompletion.
• Add walking or driving travel time to your event so you know when to leave.
• See a map of your event’s location, as well as the weather forecast for that day.
• See holidays and Facebook events in Calendar.

Safari
• Use Shared Links to discover new, interesting links posted by people you follow on Twitter and LinkedIn.
• Browse longer thanks to new core technologies that boost energy efficiency.
• Easily access your bookmarks, Reading List, and Shared Links in the new Sidebar.
• Protect your online privacy with new tracking-prevention features.

iCloud Keychain
• Don’t worry about remembering passwords — iCloud Keychain fills them in so you don’t have to.
• Keep your website passwords, credit card numbers, and Wi-Fi passwords up to date across your trusted devices. Robust 256-bit AES encryption helps keep your information safe.
• Sign in once to all of your mail, contacts, calendar, and other internet accounts, and iCloud pushes them to all your Mac computers.

Multiple Displays
• Just plug in a second display to use it with your Mac — no configuration required.
• Access the Dock and the menu bars on each display.
• Use full-screen apps on any or all of your displays.
• Use your HDTV as a second display with Apple TV.

Notifications
• Reply to mail or messages right from a notification, without having to leave the app you’re using.
• Receive notifications for incoming FaceTime calls and reply with an iMessage or set a callback reminder.
• Receive notifications from websites, even when Safari isn’t running.

Finder Tabs
• Declutter your desktop by consolidating multiple Finder windows into one.
• Move files between your tabs by simply dragging and dropping them.
• Select a custom view — icon, list, or column — for each of your tabs.
• Use tabs with full-screen Finder to organize and access all your files and folders.

Tags
• Organize files with tags no matter where they’re located — in iCloud or on your Mac.
• Give a document as many tags as you want.
• Click a tag in the Finder sidebar to see all the files with that tag.

Advanced Technologies
• With energy-saving core technologies in OS X Mavericks, you can surf the web longer on a single charge.
• Watching iTunes HD video is now more efficient, so you can watch more video when you’re not plugged in.
• App Nap regulates applications you’re not using so they consume less energy.

iCloud Keychain on iPhone, iPad, and iPod touch requires iOS 7.0.3.

Multiple Display with Apple TV and an HDTV works with Apple TV (2nd generation or newer), iMac (mid 2011 or newer), Mac mini (mid 2011 or newer), MacBook Air (mid 2011 or newer), MacBook Pro (early 2011 or newer), and Mac Pro (late 2013).

[Source] : https://itunes.apple.com/us/app/os-x-mavericks/id675248567?mt=12&ls=1
Hello guys,
I planned to start this section a long back, but due to some of the reasons, which even I don't know, hadn't made it.
From now onwards, along with the regular workarounds, tips and tuts, I would like to blog some of the good web development tutorials, plugins etc and also good templates I came across.
So keep visiting...............

Popular Labels

Featured Post (TOP)

Flickr Images

Follow Me on Facebook.com

Follow on Google+

Recent Posts

AD (728x60)

Pages

Powered by Blogger.

Labels

Followers

Popular Posts

Popular Posts

Subscribe Via Email

Sign up for our newsletter, and well send you news and tutorials on web design, coding, business, and more! You'll also receive these great gifts: