LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Empty Issue (https://www.linuxquestions.org/questions/linux-newbie-8/empty-issue-378690/)

petenyce 10-31-2005 02:07 PM

Empty Issue
 
Im running a dash script. Now i want to be able ro emthy all .txt files out of the /tmp folder? Could i have a example please thanks.

Tinkster 10-31-2005 02:40 PM

Eh?
Code:

for i in `ls -1 /tmp/*txt`; do cat /dev/null > $i; done
A very strange thing to do, though.

Or did you mean delete them?
Code:

rm /tmp/*txt


Cheers,
Tink


All times are GMT -5. The time now is 06:29 AM.