Sandra Henry-Stocker

Author Archives: Sandra Henry-Stocker

Converting and manipulating image files on the Linux command line

Most of us probably know how wonderful a tool Gimp is for editing images, but have you ever thought about manipulating image files on the command line? If not, let me introduce you to the convert command. It easily coverts files from one image format to another and allows you to perform many other image manipulation tasks as well -- and in a lot less time than it would take to make these changes uses desktop tools. Let's look at some simple examples of how you can make it work for you.Converting files by image type Coverting an image from one format to another is extremely easy with the convert command. Just use a convert command like the one in this example:To read this article in full, please click here

The aftermath of the Gentoo GitHub hack

Gentoo GitHub hack: What happened? Late last month (June 28), the Gentoo GitHub repository was attacked after someone gained control of an admin account. All access to the repositories was soon removed from Gentoo developers. Repository and page content were altered. But within 10 minutes of the attacker gaining access, someone noticed something was going on, 7 minutes later a report was sent, and within 70 minutes the attack was over. Legitimate Gentoo developers were shut out for 5 days while the dust settled and repairs and analysis were completed.The attackers also attempted to add "rm -rf" commands to some repositories to cause user data to be recursively removed. As it turns out, this code was unlikely to be run because of technical precautions that were in place, but this wouldn't have been obvious to the attacker.To read this article in full, please click here

The aftermath of the Gentoo GitHub hack

Gentoo GitHub hack: What happened? Late last month (June 28), the Gentoo GitHub repository was attacked after someone gained control of an admin account. All access to the repositories was soon removed from Gentoo developers. Repository and page content were altered. But within 10 minutes of the attacker gaining access, someone noticed something was going on, 7 minutes later a report was sent, and within 70 minutes the attack was over. Legitimate Gentoo developers were shut out for 5 days while the dust settled and repairs and analysis were completed.The attackers also attempted to add "rm -rf" commands to some repositories to cause user data to be recursively removed. As it turns out, this code was unlikely to be run because of technical precautions that were in place, but this wouldn't have been obvious to the attacker.To read this article in full, please click here

Is implementing and managing Linux applications becoming a snap?

Quick to install, safe to run, easy to update, and dramatically easier to maintain and support, snaps represent a big step forward in Linux software development and distribution. Starting with Ubuntu and now available for Arch Linux, Debian, Fedora, Gentoo Linux and openSUSE, snaps offer a number of significant advantages over traditional application packaging. Compared to traditional packages, snaps are: easier for developers to build faster to install automatically updated autonomous isolated from other apps more secure non-disruptive (they don't interfere with other applications) So what are snaps? Snaps were originally designed and built by Canonical for use on Ubuntu. The service might be referred to as “snappy”, the technology “snapcraft”, the daemon “snapd” and the packages “snaps”, but they all refer to a new way that Linux apps are prepared and installed. Does the name “snap” imply some simplification of the development and installation process? You bet it does!To read this article in full, please click here

Shredding files on Linux

The rm command easily makes files disappear from our file listings, but what does it actually do and how can we ensure that files are unlikely to be recoverable?A little background To understand what happens when you remove a file from a Linux system with rm, first think about inodes -- those intriguing data structures that keep track of all of a file's attributes -- often called "metadata" -- that describe the file. This includes its name, its owner and group, what permissions have been established and where the file's contents can be found on the disk.Next, think about Linux directories. While they take the appearance and character of folders (i.e., merely containers for holding files) they are actually files themselves -- files that include no more than the names and inode numbers of the files they "contain". So, what we get is a convenient way to think about directories and files in the same way you might think about the folders and paperwork in your file cabinets (if any of you still have one of those).To read this article in full, please click here

Linux control sequence tricks

There are quite a few control sequences available on Linux systems— many I use routinely, and some I've only just recently discovered— and they can be surprisingly useful. In today's post, we're going to run through a series of them and take a look at what they do and how they might be useful.To start, unless you're brand spanking new to the command line, you are undoubtedly familiar with the ctrl-c sequence that is used to terminate a running command. In print, this same sequence might be expressed as ^c or control-c and sometimes the "c" will be capitalized, but the expression always means "hold the control key and press the key specified — with no shift key or hyphen involved.To read this article in full, please click here

Red Hat reaches the Summit – a new top scientific supercomputer

Red Hat just announced its role in bringing a top scientific supercomputer into service in the U.S. Named “Summit” and housed at the Department of Energy’s OAK Ridge National Labs, this system with its 4,608 IBM compute servers is running — you guessed it — Red Hat Enterprise Linux.The Summit collaborators With IBM providing its POWER9 processors, Nvidia contributing its Volta V100 GPUs, Mellanox bringing its Infiniband into play, and Red Hat supplying Red Hat Enterprise OS, the level of inter-vendor collaboration has reached something of an all-time high and an amazing new supercomputer is now ready for business.To read this article in full, please click here

Comparing files and directories with diff and comm

There are a number of ways to compare files and directories on Linux systems. The diff, colordiff, and wdiff commands are just a sampling of commands that you're like to run into. Another is comm. The command (think "common") lets you compare files in side-by-side columns the contents of individual files.Where diff gives you a display like this showing the lines that are different and the location of the differences, comm offers some different options with a focus on common content. Let's look at the default output and then some other features.Here's some diff output -- displaying the lines that are different in the two files and using < and > signs to indicate which file each line came from.To read this article in full, please click here

Comparing files and directories with the diff and comm Linux commands

There are a number of ways to compare files and directories on Linux systems. The diff, colordiff, and wdiff commands are just a sampling of commands that you're likely to run into. Another is comm. The command (think "common") lets you compare files in side-by-side columns the contents of individual files.Where diff gives you a display like this showing the lines that are different and the location of the differences, comm offers some different options with a focus on common content. Let's look at the default output and then some other features.Here's some diff output — displaying the lines that are different in the two files and using < and > signs to indicate which file each line came from.To read this article in full, please click here

Copying and renaming files on Linux

Linux users have for many decades been using simple cp and mv commands to copy and rename files. These commands are some of the first that most of us learned and are used every day by possibly millions of people. But there are other techniques, handy variations, and another command for renaming files that offers some unique options.First, let’s think about why might you want to copy a file. You might need the same file in another location or you might want a copy because you’re going to edit the file and want to be sure you have a handy backup just in case you need to revert to the original file. The obvious way to do that is to use a command like “cp myfile myfile-orig”.To read this article in full, please click here

Using logger on Linux

The logger command provides an easy way to add log files to /var/log/syslog -- from the command line, from scripts or from other files. In today's post, we'll take a look at how it works.How easy is easy? This easy. Just type logger <message> on the command line and your message will be added to the end of the /var/log/syslog file.$ logger comment to be added to log $ tail -1 /vvar/log/syslog May 21 18:02:16 butterfly shs: comment to be added to log Command output You can also add the output from commands by enclosing the commands in backticks.$ logger `who` $ tail -1 /var/log/syslog May 21 18:02:43 butterfly shs: shs pts/0 2018-05-21 15:57 (192.168.0.15) Content from a file The contents of text files can be added by using the -f option. Put the name of the file to be added to the log following the -f option as shown below.To read this article in full, please click here

How to use logger on Linux

The logger command provides an easy way to add log files to /var/log/syslog — from the command line, from scripts, or from other files. In today's post, we'll take a look at how it works.How easy is easy? This easy. Just type logger <message> on the command line and your message will be added to the end of the /var/log/syslog file.$ logger comment to be added to log $ tail -1 /vvar/log/syslog May 21 18:02:16 butterfly shs: comment to be added to log Command output You can also add the output from commands by enclosing the commands in backticks.$ logger `who` $ tail -1 /var/log/syslog May 21 18:02:43 butterfly shs: shs pts/0 2018-05-21 15:57 (192.168.0.15) [ Two-Minute Linux Tips: Learn how to master a host of Linux commands in these 2-minute video tutorials ] Content from a file The contents of text files can be added by using the -f option. Put the name of the file to be added to the log following the -f option as shown below.To read this article in full, please click here

22 essential security commands for Linux

There are many aspects to security on Linux systems – from setting up accounts to ensuring that legitimate users have no more privilege than they need to do their jobs. This is look at some of the most essential security commands for day-to-day work on Linux systems.To read this article in full, please click here(Insider Story)

22 essential security commands for Linux

There are many aspects to security on Linux systems – from setting up accounts to ensuring that legitimate users have no more privilege than they need to do their jobs. This is look at some of the most essential security commands for day-to-day work on Linux systems.sudo Running privileged commands with sudo  – instead of switching user to root  – is one essential good practice as it helps to ensure that you only use root privilege when needed and limits the impact of mistakes. Your access to the sudo command depends on settings in the /etc/sudoers and /etc/group files. [ Two-Minute Linux Tips: Learn how to master a host of Linux commands in these 2-minute video tutorials ] $ sudo adduser shark Adding user `shark' ... Adding new group `shark' (1007) ... Adding new user `shark' (1007) with group `shark' ... Creating home directory `/home/shark' ... Copying files from `/etc/skel' ... Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Changing the user information for shark Enter the new value, or press ENTER for the default Full Name []: shark Room Number []: Work Phone []: Home Phone []: Other []: Is the information correct? [Y/n] Y If you run sudo Continue reading

22 essential Linux security commands

There are many aspects to security on Linux systems – from setting up accounts to ensuring that legitimate users have no more privilege than they need to do their jobs. This is look at some of the most essential security commands for day-to-day work on Linux systems.To read this article in full, please click here(Insider Story)

22 essential Linux security commands

There are many aspects to security on Linux systems – from setting up accounts to ensuring that legitimate users have no more privilege than they need to do their jobs. This is look at some of the most essential security commands for day-to-day work on Linux systems.sudo Running privileged commands with sudo  – instead of switching user to root  – is one essential good practice as it helps to ensure that you only use root privilege when needed and limits the impact of mistakes. Your access to the sudo command depends on settings in the /etc/sudoers and /etc/group files. [ Two-Minute Linux Tips: Learn how to master a host of Linux commands in these 2-minute video tutorials ] $ sudo adduser shark Adding user `shark' ... Adding new group `shark' (1007) ... Adding new user `shark' (1007) with group `shark' ... Creating home directory `/home/shark' ... Copying files from `/etc/skel' ... Enter new UNIX password: Retype new UNIX password: passwd: password updated successfully Changing the user information for shark Enter the new value, or press ENTER for the default Full Name []: shark Room Number []: Work Phone []: Home Phone []: Other []: Is the information correct? [Y/n] Y If you run sudo Continue reading

How to speak Linux

I didn’t even stop to imagine that people pronounced Linux commands differently until many years ago when I heard a coworker use the word “vie” (as in "The teams will vie for the title") for what I’d always pronounced “vee I”. It was a moment that I’ll never forget. Our homogenous and somewhat rebellious community of Unix/Linux advocates seemed to have descended into dialects – not just preferences for Solaris or Red Hat or Debian or some other variant (fewer back in those days than we have today), but different ways of referring to the commands we knew and used every day.The "problem" has a number of causes. For one thing, our beloved man pages don't include pronunciation guidelines like dictionaries do. For another, Unix commands evolved with a number of different pronunciation rules. The names of some commands (like "cat") were derived from words (like "concatenate") and were pronounced as if they were words too (some actually are). Others derived from phrases like "cpio" which pull together the idea of copying (cp) and I/O. Others are simply abbreviations like "cd" for "change directory". And then we have tools like "awk" that go in an entirely different direction by Continue reading

Blacklisting modules on Linux

The Linux kernel is modular — composed of modules that work together but are largely independent of each other. New functionality can be added when a kernel module is loaded, but there are times when you might need to block functionality because modules interfere with each other or leave a system vulnerable. When that is the case, you can restrict what modules the kernel is able to use by blacklisting the troublemakers. This blocks them from being loaded.Listing Kernel modules You can list kernel modules with the lsmod command. For a taste of what you’re likely to see, the lsmod command below shows us the top of the lsmod command output on a sample system.To read this article in full, please click here

Customizing your text colors on the Linux command line

If you spend much time on the Linux command line (and you probably wouldn't be reading this if you didn't), you've undoubtedly noticed that the ls command displays your files in a number of different colors. You've probably also come to recognize some of the distinctions — directories appearing in one color, executable files in another, etc.How that all happens and what options are available for you to change the color assignments might not be so obvious.[ Also read: Unix tip: Coloring your world with LS_COLORS | Get regularly scheduled insights by signing up for Network World newsletters. ] One way to get a big dose of data showing how these colors are assigned is to run the dircolors command. It will show you something like this:To read this article in full, please click here

What’s behind Cisco’s comeback?

Cisco Systems Inc. (NASDAQ: CSCO) in just the last week or so has taken over the top spot for year-to-date performance among the 30 equities comprising the Dow Jones industrial average, with its shares having risen nearly 20 percent in 2018. That’s a big deal. How did it happen? What pushed Cisco beyond its best-known-router reputation to being a top performer on the DOW?A little history about Cisco Cisco has been around for nearly as long as I've been working on Unix and Linux systems. Founded in December 1984 by two Stanford University computer scientists and clearly named after San Francisco, its logo clearly depicts the two towers of the Golden Gate Bridge and its line of products have kept it a major player in routers and switches. In fact, Cisco was on top of the tech world before the dot.com meltdown. Then it plunged with the rest of the tech sector.To read this article in full, please click here

1 2 3 6