Afficher un message
Vieux 25/05/2007, 09h04   #2
Chris F.A. Johnson
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut 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
  Réponse avec citation
 
Page generated in 0,04296 seconds with 9 queries