![]() |
May Promotion!Website with Hosting only $198! Contact us today for details. |
||
Blog
How to SCP a path with spaces
Published: Saturday May 19th, 2012 01:51 PM
I recently needed to remotely copy over SSH a folder from the remote machine to my local machine. Usually this is not a problem, however the path to this folder had a space in it. The folder itself is rather large and contains files which wouldn't really benefit from compression. It turns out the solution was quite simple.
These instructions are assuming you're connecting from a unix-like system to a unix-like system (eg Linux or OSX).
scp -r myserver.com:"/path/with/a/Space\\ In\\ It" ./
This basically says "recursively copy the folder at myserver.com (using the local username) to the current folder using scp". Now the spaces need to be double escaped as the first escape only signifies that they're spaces on the LOCAL machine - by the time they got to the remote machine, they wouldn't be escaped anymore. By double escaping them locally, by the time the path makes it to the remote machine they are just single escaped.
How to Check Exit Status Code in Linux
Published: Saturday May 19th, 2012 01:43 PM
When a command finishes execution, it returns an exit code. The exit code is not displayed on the screen by default. To examine the exit code, you need to examine a special variable, "$?"
Say, you are searching for a string in a text file.
$ grep x1y2z3 somefile.txt
$
The standard output of the command returns null, which is a pretty good indication that the string cannot be found in the file.
But what if you embed the grep command in a script? How can you tell if the string is found or not?
Checking the exit code will tell you. Let's first try it out interactively.
$ grep x1y2z3 somefile.txt
$ echo $?
1
Note that in bash, the exit status is 0 if the command succeeded, and 1 if failed. For grep, 0 means that the string was found, and 1 (or higher), otherwise.
To check the exit status in a script, you may use the following pattern:
somecommand argument1 argument2
RETVAL=$?
[ $RETVAL -eq 0 ] && echo Success
[ $RETVAL -ne 0 ] && echo Failure
9 Must Have Android Apps for Techies and Others
Published: Monday January 2nd, 2012 10:38 AM
ES File Explorer

ConnectBot

Keypass

Fing Network Tools

The ping feature measures the round-trip time for packets sent by Fing to a destination host. While most Operating Systems include a ping functionality, they have all slightly different options and usually handle only one host per execution. Fing improves the ping to reach multiple hosts at high speed to deliver a nice and compact report with a single execution.


Dropbox for Android
Read your docs or flip through your albums when you're out and about. Save photos or videos to your Dropbox and share them with friends in just a couple taps. Even if you accidentally leave your Android in a taxi, your stuff is always safe on Dropbox.
Features:
- Always have your stuff with you, no matter where you are.
- Save photos and videos to your Dropbox.
- Share your photos and docs with family and friends.
- Save email attachments straight to your Dropbox.
- Easily edit docs in your Dropbox.

PocketCloud
HandyBank

Overlook Whiz

NavZilla
Published: Friday December 23rd, 2011 10:42 AMHow to keep your Windows computer running smoothly
Windows 7 is a powerful, flexible operating system, but it also needs some regular attention to keep it running smoothly. It's much easier now than it was years ago, but it's still all too easy to neglect. Fortunately, quite a few processes can be automated, and the rest can be added to your weekly or monthly task list and taken care of fairly quickly. Here's what you need to do:
- Protect your computer from viruses and attacks. Microsoft Security Essentials is free, automated, and incredibly easy to configure. If you do nothing else, make sure you have this running, and you may as well uninstall any antivirus or firewall programs that came with your machine while you're at it. They may work fine, but Microsoft got it right this time.
- Remove unnecessary programs and files. While most computers these days aren't struggling for hard-drive space (unless you're an inveterate media hoarder), it's still a good idea to clear off any unwanted or unused programs now and then, as well as temporary files and other detritus. I like CCleaner for zapping programs and searching for dead files, though Revo Uninstaller is also a champ. Be sure to look carefully at what they want to delete, though; losing some things, like browser sessions, can be irritating.
CCleaner removes unnecessary programs and files. - Scan and remove malware. Many more Web sites than you would think install cookies and programs on your computer to keep tabs on you or indulge in even more nefarious shenanigans. Spybot is a fantastic, open-source program that does a great job of finding them, clearing them out, and then (if you like) watching for them in the background. This is a must for heavy Web users.
- Back up important files. It's telling that this still doesn't go without saying, several decades into the PC revolution. The odds are good that you know someone personally who's lost important data to hardware failure; now is as good a time as any for you to start insuring yourself against such a catastrophe. New options make it much simpler to automate the process, and if the worst should happen, at least you're only out some money instead of important data or memories.
Back up Windows files. - Back up your system. This may not be as important to most people as backing up pictures, e-mail, and so on, but those of us who have tweaked Windows to our liking and play around with new programs quite a bit should invest a few minutes each week or so to set up a System Restore point. It's easy to do and keeps you from having to reinstall Windows and painstakingly set it all up the way you like in the event of a major crash.
- Clean out your hardware. If you've never opened up your computer, you may be surprised by how grotty it gets inside the casing. Physical cleaning is a great way to improve your machine's longevity--just pick up a can of compressed air or a vacuum cleaner designed for computers, turn off your machine, pop the case, and get to work. Laptops are trickier, as they are harder to open up as thoroughly as desktop machines, but it's still a good idea to do what you can.
Facebook's at it Again
Published: Saturday September 17th, 2011 10:35 AM
New "Smart Lists" allow users to fine tune what shows up in their news feed, potentially ignoring your social-media marketing for good.
Facebook users, all 750 million, now have the options of viewing customized “Smart Lists” and designate how frequently they want the those on the lists to appear in your news feed. For example, Smart List with your close friends will bring more posts to your feed than an a Smart List of your acquaintances. Or maybe a your business will be added to a “Seldom-Show” list — along with others that overload with content.
Older posts are available. See archives on the main blog page.

