I
I
Innokenty2022-03-23 11:41:07
linux
Innokenty, 2022-03-23 11:41:07

How to delete all files in linux folder?

I ran into a problem, I need to delete all files along the path "/volume1/Shared folder/Programs/TEST2/" I know Cyrillic is evil, I didn't do it))

When using the rm command, it gives an error

[email protected]:/volume1/Общая папка/Программы/TEST1$ rm /volume1/"Общая папка"/Программы/TEST2/*
rm: cannot remove ‘/volume1/Общая папка/Программы/TEST2/*’: No such file or directory


Yes, you can split the command into 2 lines, but then the script will contain a command like rm *. And if someone renames the folder, then everything will fly over the beard.

Actually the question is how to implement the cleaning of the folder in one line

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Innokenty, 2022-03-23
@Kosyachella

Found the right key, using which everything works!
rm -rfv /volume1/"Shared Folder"/Programs/TEST2/*

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question