Any problem to delete /cgi-bin/ and /.well-known/ directories?

Ishware

Well-Known Member
Nov 7, 2003
211
6
168
Williamsburg, VA
cPanel Access Level
Root Administrator
The actual question is: If I'm not using cgi-bin, can I safely delete it? And what are the ramifications if I delete /home/[user]/public_html/.well-known?

I ask because I'm working on a script that, among other things, "refreshes" a public_html, i.e. removes all the files and directories, and my knowledge of regex makes it hard for me to figure out how to adapt a recipe for this. So it'd be easier for me to delete these directories if it doesn't matter. :)

For the record, in case anyone is good enough at regex and would like to help, the recipe I found to remove all files including hidden is as follows:

rm -rf {,.[!.],..?}*

Source: coderwall.com/p/kksf5q/delete-all-files-including-hidden-ones-with-just-one-rm
Delete all files (including hidden ones) with just one rm (Example)
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,909
2,224
463