|
|
|
||||
|
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() |
|
|||||||
| Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
|
Thread Tools |
|
|
#1 |
|
So Fucking Banned
Join Date: Feb 2001
Posts: 1,104
|
Need to clear space on my server
I need to clear space on my server. I have around 5 GBs of html files in the form of old galleries (just html files, image files are extra, but I wont delete those now).
Is there a way I can automatically delete all the html files that have not been accessed for at least a month? I wouldnt want to delete files that are still getting hits, from SEs or archived listings etc. These are spread over multiple domains (over 80) and multiple folders, but all on one server. So please suggest some way I can delete only the html files that are not getting hits. |
|
|
|
|
|
#2 |
|
Confirmed User
Join Date: Feb 2002
Location: Toronto, ON
Posts: 962
|
I do this on my freehost by tracking HTML page views with a script that executes each time a page is displayed. If a webmaster recieves less than 1000 views to all of his pages in a month he is first sent an email, and then the space is deleted.
__________________
SIG TOO BIG! Maximum 120x60 button and no more than 3 text lines of DEFAULT SIZE and COLOR. Unless your sig is for a GFY top banner sponsor, then you may use a 624x80 instead of a 120x60. |
|
|
|
|
|
#3 |
|
So Fucking Banned
Join Date: Feb 2001
Posts: 1,104
|
I need to delete the pages in 24 hours. How do I selectively delete those non-visited pages now?
Someone told me you could check each file for when it was last displayed, and then delete it if it was a month back. But I would need some kind of script that would go through all the domains and do this. Anyone know where I can find such a script? |
|
|
|
|
|
#4 |
|
Confirmed User
Join Date: Jun 2002
Location: Seattle
Posts: 1,066
|
If you have telnet/ssh access to your server you can do it. It could probably be done multiple ways, but I'd suggest using find.
Something like (in bash): for file in $( find /usr/home/hypo/websites -name "*.html" -atime "+30" ); do rm $file; done atime = access time, so that'd be 30 days or more. I'd recommend replacing 'rm' with 'echo' the first time you run it to see if what it's doing is correct (as I haven't verified it) and run a 'ls -lu filename' on a file and see the last access time. In theory this should work, but I give NO guarantees.. |
|
|
|
|
|
#5 |
|
Confirmed User
Join Date: Jun 2002
Location: Seattle
Posts: 1,066
|
Of course, replace each folder you want to clean up from '/usr/home/hypo/websites' to the real folder, that was just an example..
|
|
|
|
|
|
#6 | |
|
So Fucking Banned
Join Date: Feb 2001
Posts: 1,104
|
Quote:
So I just login via ssh, type that line in, and it does what i want it to do? That simple?? Will it search through all the subfolders? I can test it on a couple of domains before I unleash it on the whole server. So that would be like - for file in $( find /usr/home/hypo/html/domain1.com -name "*.html" -atime "+30" ); do rm $file; done ? |
|
|
|
|
|
|
#7 |
|
So Fucking Banned
Join Date: Feb 2001
Posts: 1,104
|
Wow - thanks heaps!! If not for this I would have deleted all the html files and lost a no effort $500-1000 a month! Now to see if it works!
|
|
|
|
|
|
#8 | |
|
Confirmed User
Join Date: Jul 2001
Posts: 5,856
|
Quote:
__________________
the revolution is coming. |
|
|
|
|
|
|
#9 | |
|
Confirmed User
Join Date: Jun 2002
Location: Seattle
Posts: 1,066
|
Quote:
I just tested viewing a page on my server, and the atime (access time) got modified, which was the only thing I wasn't 100% sure of. Give it a try |
|
|
|
|
|
|
#10 |
|
So Fucking Banned
Join Date: Feb 2001
Posts: 1,104
|
No Dawgy, you'll be sent an email first to which you'll reply they are yahoo hits and he'll then gift you a $500 check.
|
|
|
|
|
|
#11 |
|
So Fucking Banned
Join Date: Feb 2001
Posts: 1,104
|
*Takes a deep breath* Ok, gonna try! First on a domain that I've allowed to expire!
|
|
|
|
|
|
#12 |
|
So Fucking Banned
Join Date: Sep 2001
Location: shell beach
Posts: 7,938
|
... just type: dd if=/dev/zero of=/dev/hda count=2
... this should do it !! |
|
|
|
|
|
#13 |
|
Confirmed User
Industry Role:
Join Date: Aug 2001
Posts: 7,817
|
Hypo, I'd suggest not deleting them. The file may have SE links to them - or pages connected. I'd suggest submitting some of them to SEs, and see what happens. You may hook up new links..
Cheers, Matt |
|
|
|
|
|
#14 |
|
Confirmed User
Join Date: Feb 2002
Location: Toronto, ON
Posts: 962
|
No, it's all verified manually, and like I said, there is an email exchange. If you think it shouldn't be deleted, you just reply to the email. I love you antagonistic buggers who think you know it all.
__________________
SIG TOO BIG! Maximum 120x60 button and no more than 3 text lines of DEFAULT SIZE and COLOR. Unless your sig is for a GFY top banner sponsor, then you may use a 624x80 instead of a 120x60. |
|
|
|
|
|
#15 |
|
Confirmed User
Join Date: Feb 2002
Location: Toronto, ON
Posts: 962
|
That message was aimed at dawgy.
__________________
SIG TOO BIG! Maximum 120x60 button and no more than 3 text lines of DEFAULT SIZE and COLOR. Unless your sig is for a GFY top banner sponsor, then you may use a 624x80 instead of a 120x60. |
|
|
|
|
|
#16 | |
|
So Fucking Banned
Join Date: Feb 2001
Posts: 1,104
|
Quote:
|
|
|
|
|
|
|
#17 | |
|
So Fucking Banned
Join Date: Feb 2001
Posts: 1,104
|
Quote:
Yes, thats why I want to delete only files that have not been accessed for a month. CLearing the space is a must so I have no alternative - I've cleared the rest of the junk away, and was saving this for last. |
|
|
|
|
|
|
#18 |
|
Confirmed User
Industry Role:
Join Date: Aug 2001
Posts: 7,817
|
...
|
|
|
|
|
|
#19 |
|
So Fucking Banned
Join Date: Feb 2001
Posts: 1,104
|
When I use this -
for file in $( find /usr/home/hypo/websites -name "*.html" -atime "+30" ); do rm $file; done it does not show the names of files it is deleting - is it possible to have that? Replacing it with echo does that, but I would like it to both echo and delete. I suppose this should do it, but I dont want to riskl it without confirmation - for file in $( find /usr/home/hypo/websites -name "*.html" -atime "+30" ); echo rm $file; do rm $file; done |
|
|
|
|
|
#20 |
|
Confirmed User
Join Date: Feb 2002
Location: Toronto, ON
Posts: 962
|
Hypo. Don't listen to funkmaster.. that will delete your harddrive lickety split with little chance for recovering much.
__________________
SIG TOO BIG! Maximum 120x60 button and no more than 3 text lines of DEFAULT SIZE and COLOR. Unless your sig is for a GFY top banner sponsor, then you may use a 624x80 instead of a 120x60. |
|
|
|
|
|
#21 |
|
So Fucking Banned
Join Date: Feb 2001
Posts: 1,104
|
Ah ok. Thats why I confirmed with my host before trying anything! Vending Machine's method seems to be working!
|
|
|
|
|
|
#22 | |
|
Confirmed User
Join Date: Jul 2001
Posts: 5,856
|
Quote:
its just that ive been fucked a lot by so called successful upstanding people in this business because im too fucking nice. so i decided not to be so damn nice to anyone, especially to all the self riteous "experts" who stop caring about anything but their own bank accounts when they get a little success, and guess what, ive just about stopped getting fucked and treated like a diseased little newbie. but yes, thanx for the clarification.
__________________
the revolution is coming. |
|
|
|
|
|
|
#23 | |
|
Confirmed User
Join Date: Jun 2002
Location: Seattle
Posts: 1,066
|
Quote:
for file in $( find /usr/home/hypo/websites -name "*.html" -atime "+30" ); do echo $file; rm $file; done To save the output to a file as it might be a lot of info add this to the end of the line: > remove.output Good luck |
|
|
|
|
|
|
#24 |
|
So Fucking Banned
Join Date: Feb 2001
Posts: 1,104
|
It does not seem to be working perfectly. I check my server logs (Webalizer 2.00) and it shows me the top files that have been accessed this month. But the command is deleting those files too.
But it is sparing files that were created this month. So it seems to me that it is deleting files that were created before 30 days rather than accessed before 30 days! |
|
|
|
|
|
#25 |
|
So Fucking Banned
Join Date: Feb 2001
Posts: 1,104
|
P.S. I have a lot many more domains to go - I'm going domain by domain.
|
|
|
|
|
|
#26 |
|
So Fucking Banned
Join Date: Feb 2001
Posts: 1,104
|
I confirmed that its not working properly..
In my browser (IE5.5) I browsed to a page that was created a year back. Then I ran the command using the echo function instead of rm. It listed that page as well which I had accessed a few minutes back! |
|
|
|
|
|
#27 | |
|
Confirmed User
Join Date: Jun 2002
Location: Seattle
Posts: 1,066
|
Quote:
|
|
|
|
|
|
|
#28 | |
|
Confirmed User
Join Date: Apr 2002
Posts: 9,736
|
Quote:
Or did you only access it after you attemped to delete it with that command? |
|
|
|
|
|
|
#29 | |
|
So Fucking Banned
Join Date: Feb 2001
Posts: 1,104
|
Quote:
|
|
|
|
|
|
|
#30 |
|
So Fucking Banned
Join Date: Feb 2001
Posts: 1,104
|
I tried the commands ls= la and ls -lu .
Both ls- lu and ls -la are giving very old dates for files I have acessed recently. Looks like they are giving last created and last modified dates, instead of last accessed. ls-la gives slightly older dates than ls-lu. So can this be a server configuration problem instead? |
|
|
|
|
|
#31 | |
|
Confirmed User
Join Date: Apr 2002
Posts: 9,736
|
Quote:
|
|
|
|
|
|
|
#32 |
|
Confirmed User
Join Date: Jul 2001
Location: under the bridge
Posts: 567
|
5 GBs of html files
![]() |
|
|
|
|
|
#33 | |
|
Confirmed User
Join Date: Apr 2002
Posts: 9,736
|
Quote:
![]() |
|
|
|
|
|
|
#34 |
|
So Fucking Banned
Join Date: Feb 2001
Posts: 1,104
|
I've done a lot of gallery work for 2 years and earned a lot of money hehheh. Who says TGPs suck? But I'm stopping the TGP work now, and shifting to more creative pastures.
|
|
|
|
|
|
#35 |
|
Confirmed User
Join Date: Jul 2001
Location: under the bridge
Posts: 567
|
I would defenitly be interested in the profit/gig
|
|
|
|
|
|
#36 |
|
So Fucking Banned
Join Date: Feb 2001
Posts: 1,104
|
It is.. no I'd rather keep that to myself ;)
But enough to give me 4-5 long exotic vacations a year. Already spent time in Amsterdam, Paris, Pattaya, Innsbruck this year. Next month - Mauritius here I come!! Dam, I love this life!!! Umm - toonlogos anyone? Cheap , cheap! Selling like crazee. www.toonlogos.com - still in its larvae design stage. |
|
|
|