Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Linux by (18.4k points)
I am trying to delete all the files in my directory "XYZ" without using the find command in bash on Linux.

1 Answer

0 votes
by (36.8k points)

Use this  command:

rm -f XYZ/*

To delete also subdirectories, use:

rm -fr XYZ/*

If you want to delete the directory, then use

rm -fr XYZ

To know about Linux join the Linux training

 

Related questions

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...