ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
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.
I want to write a short bash script to rm all files in a directory. I have a couple of directories that have too many files to use wild cards (!, returns a 'too many arguements error), which is hosing up my machine. So, I want to use a bash script that deletes them one at a time (perhaps a repeating loop that deletes the first file in the directory, the most recent file or whatever). My bash skills are negligible. Can anyone suggest a short script?
I posted something similar in the Newbie sections, which has a description of the more general problem.
I havent read your other thread but if I wanted to delete everything in a directory, I would use "rm -rf /dir" & that removes EVERYTHING in the /dir, the r switch tell's it to recursively travel through the directory & f tell's it to force so your not repeatedly asked , are you sure?
The whole point was that he couldn't use wildcards because he had to many files. So with or without the -i options it wouldn't work either way.
But this is a very old thread so I'm sure he's got his solution by now.