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!
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Ah yes! I just caught that <--- definitely belong in the newbie forum.
Why would you pick find over ls?
find has a load of options which ls does not. For example, you can select files which have been modified in the last so many days (using the -mtime option). You can build up some quite complicated logic with the -o -a and ! boolean operators.
For example, find can list all the files modified in the last 7 days whose name matches the pattern *.txt, but not starting with "account"
Code:
find . -name '*.txt' -a \! -name 'account*' -a -mtime -7
Have a read of the find manual page to get a better idea of all the possibilities.
Thats definitely a great command. I program mostly with perl and love its regexp but know almost nothing about its equivalent in bash. Whats a good reference book for shell scripting/unix commands? I've heard of Unix Powertools but not sure if thats exactly what I am looking for.
Great advice from all thank you! I actually found a command I was looking for in the coreutils documenation; sort. I'm sure I'll end up submitting a question on it but this has definitely started me off in the right direction.
The Advanced Bash Scripting Guide that matthewg42 mentioned is specially useful if you intend to learn serious bash scripting. Regardless of the name, it's suitable for all levels, starting from beginner.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.