Showing posts with label Linux. Show all posts
Showing posts with label Linux. Show all posts
Friday, January 11, 2019
The Raspberry Pi Story
Ever wonder how those little boards got created and who was behind them? Check out this article from TechRepublic.
Friday, March 6, 2015
Use rsync on Linux/Mac to move data fast
Here's how to use rsync(1) on a Mac or Linux to move data fast:
rsync –achv[n] {local-dir} {remote-hostname}:{remote-dir}
This will sync the contents of {local-dir} to remote-hostname, {remote-dir}. If you supply the –n option (noted in the square brackets above), it will do a *dry-run only* showing you what will be done – but not yet doing it (very handy to confirm you will be copying the desired stuff to the desired remote location first).
Works for git clones, and any other directories, too. If you want to delete files that exist on {remote-dir} but not {local-dir}, add the delete-after parameter (with two leading dashes), like this:
rsync –achv[n] —delete-after {local-dir} {remote-hostname}:{remote-dir}
Transfers are generally done over ssh, so you’ll have to supply your password when prompted for it.
Rsync can pull as well as push, meaning you can reverse the positions of {local-dir} and {remote-hostname}:{remote-dir}, too. You can even use it to copy files to a different location on the local host if desired, too. Plus it’s very efficient at moving data quickly :-)
Saturday, December 7, 2013
Removing old Ubuntu kernels easily
Ubuntu doesn't automatically remove old kernel packages, so over time the number of unused kernel packages will build up. On recent releases, you could manually use the graphical UI of the Synaptic Package Manager (SPM) to locate and remove the old packages, but as of the Ubuntu Saucy Salamander release the SPM is no longer available.
However, there's a neat way to do it directly from the command line or a shell script, too. See this Ubuntu Forum article for details.
However, there's a neat way to do it directly from the command line or a shell script, too. See this Ubuntu Forum article for details.
Friday, December 6, 2013
Registering Oracle Java using alternatives on CentOS 6
If you want to add the Oracle JDK to a CentOS 6 box, one easy way is to download the JDK RPM package, and use the rpm(8) command to install it easily, like this:
$ sudo rpm -ivh jdk-7u45-linux-i586.rpm
But chances are the newly installed JDK will not be visible at the command line, especially if the openjdk is already present. How to fix this? You'll have to use the alternatives(8) command to manually register the Oracle JDK. See the instructions on the if-not-true-then-false site for details. I recommend following the "Use Java JDK latest version" example.
$ sudo rpm -ivh jdk-7u45-linux-i586.rpm
But chances are the newly installed JDK will not be visible at the command line, especially if the openjdk is already present. How to fix this? You'll have to use the alternatives(8) command to manually register the Oracle JDK. See the instructions on the if-not-true-then-false site for details. I recommend following the "Use Java JDK latest version" example.
Monday, August 26, 2013
Using openssl to encrypt/decrypt text
Here's a simple example of using the Linux openssl command to encrypt typed text data into a file and then extract it back from the file afterwards. We'll use the AES-128 encryption algorithm for this example and ask openssl to base64 encode the encrypted data afterwards, so it can be happily stored in a text file.
First, let's encrypt a test string into the file /tmp/myEncryptedData.txt:
$ openssl enc -aes128 -a -out /tmp/myEncryptedData.txt
enter aes-128-cbc encryption password: your-desired-password-here
Verifying - enter aes-128-cbc encryption password: your-desired-password-here
This is the data I'm protecting ya know!
Note: To terminate the input type a couple of Ctrl-D characters.
Now, let's read the encrypted text from /tmp/myEncryptedData.txt and display the original string back:
$ openssl enc -d -a -aes128 -in /tmp/myEncryptedData.txt
enter aes-128-cbc decryption password: your-desired-password-here
This is the data I'm protecting ya know!
Cool, huh?
First, let's encrypt a test string into the file /tmp/myEncryptedData.txt:
$ openssl enc -aes128 -a -out /tmp/myEncryptedData.txt
enter aes-128-cbc encryption password: your-desired-password-here
Verifying - enter aes-128-cbc encryption password: your-desired-password-here
This is the data I'm protecting ya know!
Note: To terminate the input type a couple of Ctrl-D characters.
Now, let's read the encrypted text from /tmp/myEncryptedData.txt and display the original string back:
$ openssl enc -d -a -aes128 -in /tmp/myEncryptedData.txt
enter aes-128-cbc decryption password: your-desired-password-here
This is the data I'm protecting ya know!
Cool, huh?
Thursday, September 3, 2009
What's Going on with CentOS?
Realizing that it's been a while since there's been a CentOS release beyond 5.3, I popped over to the centos.org website and was surprised to read that there have been some project management changes in the wind.
You might want to check it out, too.
You might want to check it out, too.
Subscribe to:
Posts (Atom)