Remove all files in a directory

前端 未结 13 2260
小蘑菇
小蘑菇 2020-12-23 19:19

Trying to remove all of the files in a certain directory gives me the follwing error:

OSError: [Errno 2] No such file or directory: \'/home/me/test/*\

13条回答
  •  南方客
    南方客 (楼主)
    2020-12-23 19:56

    star is expanded by Unix shell. Your call is not accessing shell, it's merely trying to remove a file with the name ending with the star

提交回复
热议问题