Command or script to delete hidden files on ftp?

J

Jason Priest

is there a command or script I can run on my web site to clear out
hidden files in a directory, files that were accidently chmod' to not
appear?
 
A

Anno Siegel

Jason Priest said:
is there a command or script I can run on my web site to clear out
hidden files in a directory, files that were accidently chmod' to not
appear?

You are confused. "chmod" controls access permissions, it doesn't change
the visibility of files.

You probably want to find files whose name starts with a ".". Start with
looking up opendir, readdir, and unlink in perlfunc.

Anno
 
J

Joe Smith

Jason said:
is there a command or script I can run on my web site to clear out
hidden files in a directory, files that were accidently chmod' to not
appear?

It could be the directory which has bad permissions - that could
make *all* of the files in the directory inaccessible.

print join("\n\t",'before chmod',<$directory/*>),"\n\n";
chmod 0755,$directory; # Or 0711
print join("\n\t",'after chmod',<$directory/*>),"\n";

-Joe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top