Re: bash, delete the content of a directory
On 2007-05-25, di0rz` wrote:
> hi, everyone
> i am looking for a tip to delete the content of a directory without
> deleting the actual directory with bash
shopt -s dotglob
rm -rf "$dir"/*
--
Chris F.A. Johnson, author <http://cfaj.freeshell.org/shell/>
Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)
===== My code in this post, if any, assumes the POSIX locale
===== and is released under the GNU General Public Licence
|