E-Mail:

Linux Command Line Assistance

If you are considering giving Linux a try and want to learn more about this open source operating system, LinuxCommand.org may be a good place to start. I guess the best way to describe the command line for Linux is that it is similar to what we did with DOS to fix some Windows problems. Knowing Linux commands will:

Why do you need to learn the command line anyway? Well, let me tell you a story. Not long ago we had a problem where I used to work. There was a shared drive on one of our file servers that kept getting full. I won’t mention that this legacy operating system did not support user quotas; that’s another story. But the server kept getting full and stopping people from working. One of the software engineers in our company spent the better part of a day writing a C++ program that would look through the directories of all the users and add up the space they were using and make a listing of the results. Since I was forced to use the legacy OS while I was on the job, I installed a version of the bash shell that works on it. When I heard about the problem, I realized I could do all the work this engineer had done with this single line:

du -s * | sort -nr > $HOME/space_report.txt

Graphical user interfaces (GUIs) are helpful for many tasks, but they are not good for all tasks. I have long felt that most computers today do not use electricity. They instead seem to be powered by the “pumping” motion of the mouse! Computers were supposed to free us from manual labor, but how many times have you performed some task you felt sure the computer should be able to do? You ended up doing the work by tediously working the mouse. Pointing and clicking, pointing and clicking.

So if you need to bone up on using the command line in Linux, this is one site you may wish to consider.

Do you know of any similar sites that you can recommend? If so, pass it on in the comments section.

Comments welcome. 

Source.

3 Comments

Ah, thank you for this website. I’ve seen others in the past use the command line for interesting tasks. I know http://www.catcam.com uses the command line to publish and refresh a webcam picture online, and this guy  http://wandel.ca/timelapse/index.html) used a command line script to take pictures repetitively to make a time lapse movie out of them. These fine examples show that the command line can be cool to use.

I’d like to chime in and say that in Ubuntu, you can pretty much ignore the terminal and never use it at all if you really want to, but it does come in handy when you need detailed feedback about the script you’re running, or when you want to get down and dirty and compile something locally for better performance on your machine (I only do this very occasionally, and nobody ever has to), also consider speed, if I wanted to edit xorg.conf (which is not there in the latest X releases, as it configures itself very well now, but we’ll use it as an example)

GUI:

First I hit Alt-F2 and type in “gksudo gedit”, because of Linux’s built-in security, I have no permissions as a user to edit xorg.conf, only root can do that (administrator), I then navigate to File System, then etc, X11, double click on xorg.conf to load it in gedit, make my changes, and hit save.

But thats too many steps, why don’t I hit Alt-F2 and use “gksudo gedit /etc/X11/xorg.conf” and press enter?

Well crap, I still have to wait for gedit to load……whatever can I do?

Terminal:

Click the Terminal icon (have one in my quick launch), type “sudo vim /etc/X11/xorg.conf”, it loads into the buffer instantly, I chage the line I want to change, his Ctrl-X, hit y and enter to save.

The terminal gets it done twice as fast.
———
Windows:

Start/All Programs/Accessories/Notepad, use File/Open, find the file you want to edit and double click on it to load it into notepad.

If you have Command Line on your desktop:

Open command line use “notepad C:\path\to\thefile.txt”

Command Line wins again!

(Which is why Linux and Windows still have one, a tacit admission that the GUI doesn’t work as well sometimes, and it’s the best way to administer your system)

Thank you for dropping by.

What Do You Think?

 

Want to Start a Blog Here for Free?

Are you an expert in one subject or another? If your goal is to help others and dispense hard-earned information back to the community, stake a claim on your very own Lockergnome blog today! You can write about anything - no matter the topic. Sign-up to start blogging!

68 queries / 1.656 seconds.