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.
What is the easiest way to empty a directory from the command line without removing the directory itself?
I want to put a couple of aliases in my .bashrc to empty these folders I've got from downloading data from a few lab instruments.
For example ~/lab/instruments/epic-32-random-char-folder/
I've found that deleting the whole folder is a mistake. It saves me a number of steps in the download if those long named dirs are already in place. The software that analyzes the results copies out of the directories but doesn't clear them. Long story short these dirs must be manually cleared of about a thousand files between each use.