Last year, the company released its first handset. This year, it’s thinking bigger.
Top Five Enterprise Technology Trends for 2015
What technological trends can we expect to shape the enterprise in 2015?
According to predictions released by US carrier Verizon, strategic network investments will be a top priority for chief information officers (CIOs) working in the corporate world next year, as more and more companies seek to make sense of Big Data, profit from the internet of ihings (IoT) and make the transition to the cloud.
Setting Up RAID 10 or 1+0 (Nested) in Linux – Part 6
RAID 10 is a combine of RAID 0 and RAID 1 to form a RAID 10. To setup Raid 10, we need at least 4 number of disks. In our earlier articles, we’ve seen how to setup a RAID 0 and RAID 1 with minimum 2 number of disks. Here we will use both RAID […]
Scripting made fun: Creating a melody of simplicity
Last time I uncovered a language that created a two-way communication tunnel with my Linux system. When you learn a two-way method of communication, the intentions of both communicators are understood. My Linux systems understand my intentions. It knows that my objective is to make my system very simple to operate in accordance to my standard of simplicity. This way I can understand more thoroughly how my system works. Once approved, more of the underlining functions of my system are revealed. What I started creating was a melody of simplicity.
Last time, I wrote a blog titled “scripting made fun”. The article was to inspire a new way of scripting that removed boredom and fear of learning programming. When you enjoy what you are doing, you do more of it and differently. I found my unique communication style.
My system must be psychic; a voice repeatedly recited, “take a sentence of mundane commands and reduce them to one word”. I did this using variables. From variables now moving to actually writing scripts with multiple lines of code. For assistance, you can learn how scripts work by reading script files like “fstab” or “init.d”. Take time to dissect them. When learning Linux, allow yourself time to take things apart.
I kept the scripts in my home folder, and modified the default search path. This time, they have been placed in one of the already declared default search folders. As I furthered my readings of The LPILinux essentials study material, It was recommended to place compiled or custom made programs in the “/usr/local/ directory”. I don’t have to worry about my scripts being moved when my system upgrades.
When I placed the scripts in this directory, the owner changed from me to “root”. Give me back what is rightfully mine. I am not running “sudo” before my OWN programs. Management is under revision.
The command “chown” changes the ownership of a program.
#sudo chown <new profile name> <name of file or diretory>
Your files, directories, or scripts will have your profile name as the owner. That means, no sudo (HA!)
These are the scripts in prototype form.
-
endsystem
-
opendvd
-
playdvd
-
systemrestart
-
update_debian
Most of them are of basic “command and argument” format, “do this on/to this”. Simple? Perhaps. But something happened. I took it a step further. I am now using the if-then-else statements. Rather than just following orders, you follow orders based on logical conditions. Lets look at the “playdvd” script as an example.
Playdvd
#!/bin/bash
#This script will run vlc on DVD drive mounted in the /media folder as cdrom0
#If not, it will run vlc on dvd device /dev/sr0
if
[ -d /media/cdrom0 ]
then
vlc /media/cdrom0;
else
vlc /dev/sr0;
fi
#end
The if-then-else programming statements simply mean, if a condition is satisfied, execute a command on that condition, otherwise run the alternative if the condition is not.
“if
[ -d /media/cdrom0 ]
then
vlc /media/cdrom0;”
This statement means “if the directory ‘/media/cdrom0’ exists, then run ‘vlc’ on that directory. The “-d” switch represents a directory as I have come to understand. In fact, if you were to run, “#ls -al” on the “/usr” directory, you would see that same “d” switch in the output attributes of a directory.
ls -al
total 132
drwxr-xr-x 10 root root 4096 Jun 23 10:09 .
drwxr-xr-x 22 root root 4096 Aug 31 22:51 ..
drwxr-xr-x 2 root root 65536 Nov 8 08:52 bin
drwxr-xr-x 2 root root 4096 Jun 23 10:22 games
drwxr-xr-x 18 root root 4096 Jun 23 10:24 include
drwxr-xr-x 163 root root 20480 Nov 8 08:52 lib
drwxr-xr-x 10 root root 4096 Jun 23 10:09 local
drwxr-xr-x 2 root root 12288 Oct 27 14:47 sbin
drwxr-xr-x 277 root root 12288 Nov 8 08:52 share
drwxr-xr-x 6 root root 4096 Oct 21 14:23 src
If you look at the line ending with “games”, you will notice that it begins with a “d”. This “d” label means “directory”. Going back to the [ -d /media/cdrom0 ] code line, what we are saying, if you find the directory “-d” of “/media/cdrom0”, then run “vlc /media/cdrom0”.
The “then” statement tells the script what to do after the first condition has been met.
“then
vlc /media/cdrom0”
The program looks for a directory named, “/media/cdrom0”. My dvd drive mounts itself in this directory whenever I insert a DVD or audio CD.
If for some reason, the directory “/media/cdrom0” does not exist, then the script must an. Alternative. “/dev/sr0” is the actual DVD/CD-ROM device. This line tells the script to run vlc on this directory if the first condition is not met.
“else
vlc /dev/sr0;”
fi
#end
You must also end a conditional script with an “fi” which means “end if”, otherwise the program won’t know when to quite.
For every script created, it must be made executable, meaning it has to look like something the shell has to run not read. The command “chmod” does just that. The “chmod” command tells the shell what type of file permissions to give a user or group. There are three types, execute, read and write. Well, I wanted to give myself execute permissions on this script. The shell then allows me to run the script as a program.
#sudo chmod u+x playdvd = “u” means “the user, “x” means execute. The “+” means add the permission.
This command tells the shell to make the “playdvd” file an execution program. When the shell reads the commands “playdvd” it will execute all the lines in the file and perform the action.
Me and my mouse need consulting. I am spending way too much time on the terminal than on the point-and-click device. Can’t help it. All I have to do is press a three-key combination, terminal opens, and I type my desired program. I even stopped physically opening up the dvd drive. I type a command to do that, and a command to close it.
Looking at it from another perspective. I am learning how to operate my system with or without the mouse.
How to Visualize Memory Usage on Linux
Lack of sufficient physical memory can significantly hamper the performance of Linux desktop and server environments. When your desktop is sluggish, one of the first things to do is to free up RAMs. Memory usage is even more critical in multi-user shared hosting or mission-critical server environments, where different users or application threads constantly compete…
Intel Unveils Xeon Phi Roadmap for HPC
At the SC14 supercomputing show, the chip maker also gave more details about its Omni-Path interconnect, which will challenge InfiniBand.
Dooscape 1.2 Released – A Web Browser with a Simple and Neat Interface
Dooscape is a web browser written in Qt which features a simple and clean interface and is based on the QtWebKit engine. Dooscape has some neat features and takes a different approach compared to traditional web browsers.
Ceph-Starter SUSE to Enter Software-Defined Storage Market
Linux vendor aims to take on EMC with commodity storage
Linux vendor Suse has kicked off this year’s SuseCon in Orlando, Florida by announcing that it’s getting into the software-defined storage business, starting early next year.…
100 Open Source Replacements for Expensive Applications
Certain types of software have long had a reputation for being very expensive. As cloud computing has become more popular, many popular software packages have switched to a monthly subscription model rather than charging users a one-time fee. While these subscriptions often look inexpensive on a monthly basis, the fees can really add up over time.
While there are many good reasons to consider open source applications, the ability to avoid or reduce these fees continues to be a primary factor for many users. With that in mind, we’ve updated our annual list of open source applications that can replace expensive closed source apps.
Read more at Datamation.
FreeBSD Receives A Million Dollar Donation
The FreeBSD has received their largest ever single donation: $1,000,000 USD…