Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Greetings, I just started learning the Linux command-line, I am reading a book on it and today I learned a little about pipelines, redirection and a little about grep. I tried the example out of the book and it worked as expected but as I tried an example for myself, the results were not as I had expected. In the following I tried to filter out the results of the “ls” command with “grep” to only show files containing the characters '.c',
In my folder /home/linus/prog where I keep my C programming source-files, amongst other things, I ran the following command:
First off I am sure there are dozens of more efficient and better ways to accomplish this simple task but I am trying to learn the basics, in particular "grep". Anyway why does booksrc,booksrc.zip, project, and testc all show up? Does grep ignore non-alphabetic characters? Or maybe '.' is some wild card I am unaware of?
In any case, while the above may be good for practice, file listing and processing should almost always be done with globbing patterns instead, or find, if you need more advanced matching (and be sure to use null separators when you do).
You should never depend on parsing ls for lists of files or their metadata.
Last edited by David the H.; 03-20-2013 at 06:57 AM.
Reason: fixt links