shel options
Why does rm -rf /tmp/myfiles/* not result in an empty directory? Because of /tmp/myfiles/.config. You can’t use rm -rf /tmp/ myfiles/.* because that would match /tmp/myfiles/.., which is /tmp itself. You could always use rm -rf /tmp/myfiles, which will remove /tmp/myfiles and everything in it, but if you want the directory to remain, you can use the dotglob shell option.
Comments
Post a Comment