Reviews Using the Linux Ls Command to See Linux File "Patterns" – Linux Commands Training Quick Tips

[ad_1]

The [pattern] Part of a Linux Command

The Linux [pattern] (a.k.a. Linux shell pattern) part of a Linux command is a combination of letters and wildcard characters that are used with Linux commands to view information about Linux directories and files.

The Linux [pattern] of a Linux command does not work the same with all commands.

Linux ls Command Examples Showing Linux Command Patterns for Linux Files and Directories

The Linux commands examples that are shown below will help you to understand how a “file (or directory) matching pattern” can be used with a Linux command.

The Linux commands below will work in most Linux distributions, however, some of the Linux ls commands below may not show any Linux files in the output, depending on your Linux distribution.

The [pattern] component of a command is used to represent a file matching “pattern”. It can be one or more letters, numbers or other characters and may include the * (asterisk) and ? (question mark) wildcard characters.

A [pattern] can be the name of an item (directory or file) or part of the name of an item (plus wildcard characters).

A [path] to a directory can precede a [pattern] (as shown in the second Linux command example shown below).

When a [path] is not used with a command, the command will typically display output based on the files in the current directory (as shown in the first Linux command example below).

The Linux ls command below uses the pattern of * (a single asterisk) to show all files in the current directory (and if you’re working as a “regular” user and you’re in your home directory, there may not be any files or directories that appear).

    $ ls -l *

The ls command below uses the path and pattern of “/etc/hos*” to show all files in the etc directory that begin with “hos”. The [path] is /etc and the [pattern] is “hos*” (which uses the * wildcard character in the pattern).

    $ ls -l /etc/host*

The suffix (a.k.a. filename extension, extension) in the name of an item is the far right . (dot) and characters at the right of the . (dot).

For example, in the directory named rc.d, the “.d” is the suffix of the directory and in the file named speedbar.gz, the “.gz” is the suffix of the file.

In the Linux ls command example below, the path and pattern is “/etc/*.cfg” and path is “/etc” and the pattern is “*.cfg”. This Linux command shows a listing of all files that end in “.cfg” in the etc directory, which is below the root directory.

    $ ls -l /etc/*.cfg

In the ls command example below, the ? wildcard character is used to represent any single character in the pattern of “host?” to show only files with a single character at the right of “host”.

    $ ls -l /etc/host?

The Linux concepts and commands discussed above apply to Red Hat, Debian, Slackware, Ubuntu, Fedora, SUSE and openSUSE Linux – and also ALL Linux distributions.

[ad_2]

Source by Clyde E. Boom

Reviews Linux Command Line UI

[ad_1]

Many functions can be performed by either the command interface or through a Graphical User Interface (GUI) in a typical Linux system. As a system administrator, I prefer the simpler interface provided by the commands line. It is with the command line that I find efficiency is optimized allowing my ability to perform tasks much faster. Task automation is the friend of the system administrator. And It is with a script that commands can be invoked easily through the commands interface, making the system administrator look like a magician to the uninitiated. In my own opinion, the command line epitomizes the elegance of a good User Interface design. It is simple in design, yet powerful. More powerful than what is available through the GUI. It is functional, practical and fast. Let’s look at a very common command in Linux. The ls command is used to list the contents of a directory. Using the command line for an example, I quickly created three test files in less than 30 seconds using a command called touch. I then did a list using the ls command with some options that give me information about these files.

ls -al

total 8

drwxrwxr-x 2 user group 4096 Oct 29 23:08.

drwx—— 3 user group 4096 Oct 29 23:07..

-rw-rw-r– 1 user group 0 Oct 29 23:08 another

-rw-rw-r– 1 user group 0 Oct 29 23:08 big_file

-rw-rw-r– 1 user group 0 Oct 29 23:08 small_file

It is outside the scope of this article to discuss the outcome of the ls command. What my intention of pointing out is how quickly the User Interface of the line gives information. I find this to be much more effective than launching a GUI application and navigating to the directory I am interested in. It is typing in five characters and BAM! there are my results.

The Linux command User Interface also lets you combine commands to increase the power and function of your command line glorious interaction. Let’s say you only wanted to see the file with the name small_file in this directory. If this were a long list of files in a directory, filtering for the filename you are looking for would perhaps be desirable.

ls -al | grep small_file

-rw-rw-r– 1 user group 0 Oct 29 23:08 small_file

Now, using the power of the ability to combine commands with this User Interface of the line we only get the result we are interested in by leveraging the pattern matching command of grep. The capability of combining commands at the command line interface is nothing short of amazing. Functions like file manipulation with a command line interface is the only way to go. You can make files, make directories, change permissions, change ownership, and copy files in seconds.

So what is the downside to the user interface as provided by the line? The answer to that is simple. You have to know the commands to take advantage of the power and speed. You lose all efficiency and power if you do not have your commands known to you. A GUI interface makes up for that by presenting information in an intuitive manner to find. A command line doesn’t do that for the user.

You have to know it to benefit. Sure, you can look things up. But the more you have to look up information, the less efficiency you gain.

A illustration of this is the editor preferred by most system administrators. The editor is called vi, or some might prefer vim which stands for vi improved. Both editors are fast and powerful – just like the command line. However, without committing the shortcut keys to memory, vi loses much of its strengths. It becomes frustrating to navigate. Simple tasks become more difficult. But in the hands of an experienced user, editing in vi can be magical.

The purpose of this article is to remind the world there are those of us who prefer a simple interface on occasion. We’ll take the advice of Albert Einstein and prefer our interactions with technology to occasionally be more raw. Give us the more powerful interface versus the elegant one any day. User Interface as an industry will continue seeking graphical representations of underlying functions. But we as system administrators will always prefer not having to use our mouse device as a user interface to interact with our Linux operating systems.

[ad_2]

Source by Viktor Zizic

Reviews 7 Ways to Renew Your Old Computer

[ad_1]

What happens when you have an old, poor performing computer which sucks your time and create frustration every day? Here are 7 ways in which you can make the best of it.

1. Upgrade

Did you just install a software or game, and your computer is crawling while loading them?

Yes, it’s probably a very good to spend some money, and upgrade that tortoise. It’s definitely one of the best ways to speed up the old computer with minimum cost.

While it’s not always possible to do an upgrade, especially for laptops, you should still be able to upgrade its RAM and hard disk drive. RAM, also known as PC memory, can give you an extra boost in performance. And upgrading your hard disk to a solid state drive is another way to do it – not only will it boot up faster, your applications will perform better as well.

Just these two minor upgrades will keep your computer fresh and faster.

2. Steroids for CPU

While some computers don’t have the option to upgrade their processor unit and graphics card, you can always work around tweaking its processor.

Overclock it.

If you are adventurous enough, you can try overclocking your processor. It’s one of the best way to squeeze out more performance without breaking the bank.

3. Monthly Clean Up

Before you jump to conclusion, you may want to troubleshoot your computer and make sure the slowness is not caused by malware – viruses, worms, trojan horses spyware or adware.

Do a full computer scan with your antivirus software like AVG, Symantec or McAfee. Also, you can clean up temporary files, update windows, and defrag your hard disk.

If all else fails, don’t despair, you can try to reinstall your operating system from scratch.

4. Speed up Your Applications

Even when it sounds weird to be true, the truth is that some good programs are not optimized to run at their peak performance.

For example, if your web browser loads slowly, it could be due to its history size, installed extensions, or plugins.

5. The Older Versions

If your hardware doesn’t support the latest version of a particular application, like Photoshop CS5, use an older version instead. While running older software isn’t always the best idea, if it can still get the job done, you will get lesser frustration and time wastage.

6. Deal with Your External Components

Besides their superior performance, brand new computers offer the fresh feeling of owning it, like a brand new car. New mouse, keyboard and speakers. These are the items which you can replace easily, without breaking much of a sweat. Sometimes all you need to do is to just buy new external parts.

It will make your computer feel nicer – at least for a few months.

If you dislike your current mouse or keyboard so much, because of their worn out look or clicking issue, find better ones and replace them instead. (Using a mouse feels so much better than using your laptop’s trackpad.)

Hate your old speakers? Get a new headphone set – it’s up to you to decide what you want.

It’s true that those external parts won’t make your computer perform better, but it could save you from pulling your hair – while dealing with the frustration.

7. Light Weight Champion

If you really don’t want to part with your old computer, here’s another way to get around.

Install another operating system and then try them out.

And there are plenty of options out there. Great news is that some of them are free.

Here are some of the options available in the market today: Linux mint, Chrome OS, Jolicloud, Ubuntu. They should perform better even on older hardware.

If all else fails, seriously, you might have to bite the bullet and go out there to purchase a brand new computer. And if you decide to ditch your old computer, do make sure you recycle it properly.

[ad_2]

Source by William Wu