Search Results

Search: Posts Made By: pdc
47,639
Posted By pdc
Thanks for your solution. Apologies if I...
Thanks for your solution.

Apologies if I didn't make my question clear. I was asking if there was any easy way of getting behaviour similar to a hypothetical "empty" command -- "$ empty dir" --...
47,639
Posted By pdc
Except that won't remove any subdirectories....
Except that won't remove any subdirectories. Removing the "-type f" and specifying "rm -r" fixes this issue... but you'll still hit an error when find attempts to remove the "." directory....
47,639
Posted By pdc
It's not homework. I'm looking to know mostly out...
It's not homework. I'm looking to know mostly out of curiosity, but you could argue that using wildcards is bad anyway. If there's a million files in the directory, that's a million rm processes...
47,639
Posted By pdc
Remove contents of directory, but not directory
What's the best way to delete everything in a directory, but not the directory itself, without using shell wildcards?
Showing results 1 to 4 of 4

 
All times are GMT -4. The time now is 03:00 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy