 <p>I think this is a reasonable way:</p> <pre><code>find . -maxdepth 1 \! -name . -print0 | xargs -0 rm -rf </code></pre> <p>and it will also take care of hidden files and directories. The slash isn't required after the dot and this then will also eliminate the possible accident of typing <code>. /</code>. </p> <p>Now if you are worried what it will delete, just change it into</p> <pre><code>find . -maxdepth 1 \! -name . -print | less </code></pre> <p>And look at the list. Now you can put it into a function:</p> <pre><code>function enum_files { find . -maxdepth 1 \! -name . "$@"; } </code></pre> <p>And now your remove is safe:</p> <pre><code>enum_files | less # view the files enum_files -print0 | xargs -0 rm -rf # remove the files </code></pre> <p>If you are not in the habit of having embedded new-lines in filenames, you can omit the <code>-print0</code> and <code>-0</code> parameters. But i would use them, just in case :)</p>