Sandra Henry-Stocker

Author Archives: Sandra Henry-Stocker

Backing up not just your data, but your productivity

Everyone knows that backups are important, but most of us tend to think of backups solely as the process of backing up our data files -- not necessarily our applications, our passwords or our computers. And, when we run into a serious problem that threatens our ability to get our work done, it just might be time to rethink what "backing up" should involve.Even if you have more than one computer at your disposal, it could easily be that only one of them is ready to help you with passwords you rarely use, provide access to your cloud backups, allow you to connect to the VPN you use for special projects, probe your network for problems or offer you a way to log into remote systems.To read this article in full, please click here

How to dig up configuration details on your Linux system with getconf

Linux systems can report on a lot more configuration details than you likely ever knew were available. The trick is using the getconf command and having an idea what you are looking for. Watch out though. You might find yourself a bit overwhelmed with how many settings are available.To start, let's look at a few settings that you might have expected to see to answer  some important questions.Summarizing your command-line usage on Linux For starters, how long can a filename be?You can check this setting by looking at the NAME_MAX setting.To read this article in full, please click here

How to dig up configuration details on your Linux system with getconf

Linux systems can report on a lot more configuration details than you likely ever knew were available. The trick is using the getconf command and having an idea what you are looking for. Watch out though. You might find yourself a bit overwhelmed with how many settings are available.To start, let's look at a few settings that you might have expected to see to answer  some important questions.Summarizing your command-line usage on Linux For starters, how long can a filename be?You can check this setting by looking at the NAME_MAX setting.To read this article in full, please click here

Peering into binary files on Linux

Any file on a Linux system that isn't a text file is considered a binary file--from system commands and libraries to image files and compiled programs. But these files being binary doesn't mean that you can't look into them. In fact, there are quite a few commands that you can use to extract data from binary files or display their content. In this post, we'll explore quite a few of them.file One of the easiest commands to pull information from a binary file is the file command that identifies files by type. It does this in several ways--by evaluating the content, looking for a "magic number" (file type identifier), and checking the language. While we humans generally judge a file by its file extension, the file command largely ignores that. Notice how it responds to the command shown below.To read this article in full, please click here

Peering into binary files on Linux

Any file on a Linux system that isn't a text file is considered a binary file--from system commands and libraries to image files and compiled programs. But these files being binary doesn't mean that you can't look into them. In fact, there are quite a few commands that you can use to extract data from binary files or display their content. In this post, we'll explore quite a few of them.file One of the easiest commands to pull information from a binary file is the file command that identifies files by type. It does this in several ways--by evaluating the content, looking for a "magic number" (file type identifier), and checking the language. While we humans generally judge a file by its file extension, the file command largely ignores that. Notice how it responds to the command shown below.To read this article in full, please click here

Checking Linux system performance with sar

Sar is a system utility that gives us many ways to examine performance on a Linux system. It provides details on all aspects of system performance including system load, CPU usage, memory use, paging, swapping, disk usage, device load, network activity, etc.The name "sar" stands for "system activity report," and it can display current performance, provide reports that are based on log files stored in your system's /var/log/sa (or /var/log/sysstat) folder, or be set up to automatically produce daily reports. It's part of sysstat – a collection of system performance monitoring tools.To check if sar is available on your system, run a command like this:To read this article in full, please click here

Checking Linux system performance with sar

Sar is a system utility that gives us many ways to examine performance on a Linux system. It provides details on all aspects of system performance including system load, CPU usage, memory use, paging, swapping, disk usage, device load, network activity, etc.The name "sar" stands for "system activity report," and it can display current performance, provide reports that are based on log files stored in your system's /var/log/sa (or /var/log/sysstat) folder, or be set up to automatically produce daily reports. It's part of sysstat – a collection of system performance monitoring tools.To check if sar is available on your system, run a command like this:To read this article in full, please click here

Rescuing a Linux system from near disaster

The more you know about how Linux works, the better you'll be able do some good troubleshooting when you run into a problem. In this post, we're going to dive into a problem that a contact of mine, Chris Husted, recently ran into and what he did to determine what was happening on his system, stop the problem in its tracks, and make sure that it was never going to happen again.Disaster strikes It all started when Chris' laptop reported that it was running out of disk space--specifically that only 1GB of available disk space remained on his 1TB drive. He hadn't seen this coming. He also found himself unable to save files and in a very challenging situation since it is the only system he has at his disposal and he needs the system to get his work done.To read this article in full, please click here

Rescuing a Linux system from near disaster

The more you know about how Linux works, the better you'll be able do some good troubleshooting when you run into a problem. In this post, we're going to dive into a problem that a contact of mine, Chris Husted, recently ran into and what he did to determine what was happening on his system, stop the problem in its tracks, and make sure that it was never going to happen again.Disaster strikes It all started when Chris' laptop reported that it was running out of disk space--specifically that only 1GB of available disk space remained on his 1TB drive. He hadn't seen this coming. He also found himself unable to save files and in a very challenging situation since it is the only system he has at his disposal and he needs the system to get his work done.To read this article in full, please click here

What you can find out asking which, whereis and whatis in Linux

The which, whereis and whatis commands on a Linux system provide information about commands. They provide related but not identical information. In this post, we’ll check out the differences and provide a script for getting information that’s available from all three commands. We’ll also explore some sample commands for looking at secondary (i.e., not section 1) man pages.which The which command will show you the file-system location for a command’s executable. This is the file that is read and run whenever you type the command name.$ which date /usr/bin/date $ which shutdown /usr/sbin/shutdown Summarizing your command-line usage on Linux The which command will also report on your aliases and show you the commands they invoke.To read this article in full, please click here

What you can find out asking which, whereis and whatis in Linux

The which, whereis and whatis commands on a Linux system provide information about commands. They provide related but not identical information. In this post, we’ll check out the differences and provide a script for getting information that’s available from all three commands. We’ll also explore some sample commands for looking at secondary (i.e., not section 1) man pages.which The which command will show you the file-system location for a command’s executable. This is the file that is read and run whenever you type the command name.$ which date /usr/bin/date $ which shutdown /usr/sbin/shutdown Summarizing your command-line usage on Linux The which command will also report on your aliases and show you the commands they invoke.To read this article in full, please click here

Troubleshooting your bash scripts

If you run into problems building, testing or running complex bash scripts, don't lose heart. There are many ways you can help ensure that your scripts will work flawlessly. In this post, we'll examine some ways you can lessen the likelihood of errors and how to go about doing some simple but very effective troubleshooting.Through a combination of robust logic that tests for possible problems and some troubleshooting to help detect errors, your scripts are likely to be ready for showtime very quickly.Summarizing your command-line usage on Linux Building the outer edges first One way to avoid syntactical errors in scripts is to start your for and while loops, case statements and if/then commands using the outer logic first. If you start your script logic using a syntactical "skeleton", you won't forget to end it properly.To read this article in full, please click here

Troubleshooting your bash scripts

If you run into problems building, testing or running complex bash scripts, don't lose heart. There are many ways you can help ensure that your scripts will work flawlessly. In this post, we'll examine some ways you can lessen the likelihood of errors and how to go about doing some simple but very effective troubleshooting.Through a combination of robust logic that tests for possible problems and some troubleshooting to help detect errors, your scripts are likely to be ready for showtime very quickly.Summarizing your command-line usage on Linux Building the outer edges first One way to avoid syntactical errors in scripts is to start your for and while loops, case statements and if/then commands using the outer logic first. If you start your script logic using a syntactical "skeleton", you won't forget to end it properly.To read this article in full, please click here

Viewing compressed file content on Linux without uncompressing

If you need to check the contents of a compressed text file on Linux, you don't have to uncompress it first. Instead, you can use a zcat or bzcat command to extract and display file contents while leaving the file intact. The "cat" in each command name tells you that the command's purpose is to display content. The "z" tells you that it works with compressed files.Which of the two commands to use depends on the type of compressed file you are examining. If the file was compressed with gzip or zip, you would use the zcat command. If the file was compressed with bzip2, you would use the bzcat command. On some systems, zcat might be called gzcat.To read this article in full, please click here

Viewing compressed file content on Linux without uncompressing

If you need to check the contents of a compressed text file on Linux, you don't have to uncompress it first. Instead, you can use a zcat or bzcat command to extract and display file contents while leaving the file intact. The "cat" in each command name tells you that the command's purpose is to display content. The "z" tells you that it works with compressed files.Which of the two commands to use depends on the type of compressed file you are examining. If the file was compressed with gzip or zip, you would use the zcat command. If the file was compressed with bzip2, you would use the bzcat command. On some systems, zcat might be called gzcat.To read this article in full, please click here

Using Gimp to modify PDF files

If you’ve never used Gimp—a free image editor available for GNU/Linux, OS X, Windows and other operating systems—you might be quite surprised by its capabilitiesI use it for everything from Facebook posts when the available backgrounds don’t work well for what I want to say to political buttons that I design and press out using a button-making machine.Converting and manipulating image files with Linux commands Gimp can do everything from resizing and cropping images to adding text, changing colors or distorting images in artistic ways. You can use it to draw with its pencil or paintbrush and layer additional images. It’s quite a versatile tool. Yet I only recently noticed that it can also be used to manipulate PDF files, not just the many types of image files that most people use it to create, modify or enhance.To read this article in full, please click here

Using Gimp to modify PDF files

If you’ve never used Gimp—a free image editor available for GNU/Linux, OS X, Windows and other operating systems—you might be quite surprised by its capabilitiesI use it for everything from Facebook posts when the available backgrounds don’t work well for what I want to say to political buttons that I design and press out using a button-making machine.Converting and manipulating image files with Linux commands Gimp can do everything from resizing and cropping images to adding text, changing colors or distorting images in artistic ways. You can use it to draw with its pencil or paintbrush and layer additional images. It’s quite a versatile tool. Yet I only recently noticed that it can also be used to manipulate PDF files, not just the many types of image files that most people use it to create, modify or enhance.To read this article in full, please click here

6 clever command-line tricks for fewer keystrokes

Linux commands offer a lot of flexibility. This post details some ways to make them even more convenient to use by making use of some clever tricks.Using file-name completion You can avoid typing a full file name by typing the beginning of its name and pressing the tab key. If the string uniquely identifies a file, doing this will complete the filename. Otherwise, you can enter another letter in the name and press tab again. However, you can also get a list of all files that begin with a particular string by typing the string and then hitting the tab key twice. In this example, we do both:$ ls di<tab><tab> diff-commands dig.1 directory dig.2 dimensions disk-usage-commands $ cd dir<tab> $ pwd directory [Find out how MINNIX was used as the inspiration for Linux.]   Reusing commands and changing them Reissuing recently used commands is easy in bash. To rerun the previous command, all you have to do it type !! on the command line. You can also reissue a command with changes. If you issued the first command shown below only to find that sshd wasn't running, you could issue the second command to start it. Continue reading

6 clever command-line tricks for fewer keystrokes

Linux commands offer a lot of flexibility. This post details some ways to make them even more convenient to use by making use of some clever tricks.Using file-name completion You can avoid typing a full file name by typing the beginning of its name and pressing the tab key. If the string uniquely identifies a file, doing this will complete the filename. Otherwise, you can enter another letter in the name and press tab again. However, you can also get a list of all files that begin with a particular string by typing the string and then hitting the tab key twice. In this example, we do both:$ ls di<tab><tab> diff-commands dig.1 directory dig.2 dimensions disk-usage-commands $ cd dir<tab> $ pwd directory [Find out how MINNIX was used as the inspiration for Linux.]   Reusing commands and changing them Reissuing recently used commands is easy in bash. To rerun the previous command, all you have to do it type !! on the command line. You can also reissue a command with changes. If you issued the first command shown below only to find that sshd wasn't running, you could issue the second command to start it. Continue reading

6 Linux command-line tricks for fewer keystrokes

Linux commands offer a lot of flexibility. This post details some ways to make them even more convenient to use by making use of some clever tricks.Using file-name completion You can avoid typing a full file name by typing the beginning of its name and pressing the tab key. If the string uniquely identifies a file, doing this will complete the filename. Otherwise, you can enter another letter in the name and press tab again. However, you can also get a list of all files that begin with a particular string by typing the string and then hitting the tab key twice. In this example, we do both:$ ls di<tab><tab> diff-commands dig.1 directory dig.2 dimensions disk-usage-commands $ cd dir<tab> $ pwd directory [Find out how MINNIX was used as the inspiration for Linux.]   Reusing commands and changing them Reissuing recently used commands is easy in bash. To rerun the previous command, all you have to do it type !! on the command line. You can also reissue a command with changes. If you issued the first command shown below only to find that sshd wasn't running, you could issue the second command to start it. Continue reading

1 6 7 8 9 10 25