How to delete all files in the current directory in Ubuntu?

In Ubuntu, you can use the rm command to delete all files in the current directory. Please note that using this command will permanently delete the files, so please proceed with caution.

The following command can be used to delete all files in the current directory:

rm *

This will delete all files in the current directory, but not the subdirectories. If you want to delete everything including the subdirectories, you can use the rm -r command.

rm -r *

Be cautious when using the rm command, make sure you really want to delete those files because they cannot be recovered once deleted.

bannerAds