T Thu Ha New member Jan 12, 2022 #1 How do you delete a file not a directory in Linux? Answer rm -f dirname/* will remove only files without prompting for each file. It will also display “Cannnot remove ‘subdirname’: Is a directory” for each sub directory.
How do you delete a file not a directory in Linux? Answer rm -f dirname/* will remove only files without prompting for each file. It will also display “Cannnot remove ‘subdirname’: Is a directory” for each sub directory.