![]() |
how to see what largest files are on disk?
hello,
How can I tell what are the largest files on a disk or partition on windows 2000 server? (even 2003). On unix/linux, you can use the du (disk usage) command and then sort it by size, even output it to a file if you want. I would like something scriptable - I have lots of win2k servers that have mystery files on them. No documentation, so I have to start from scratch. I intend to write a script that will determine the file size (per disk) for each server and output the results (sorted by size) to a file. Later on, I can put those results in a spread sheet for easier analysis. It's not that hard to do this on unix/linux....I've looked on the help files and all over win2k reference books, but I can't find a command line tool that does this. I can't sit at each server with windows explorer poking around each folder - that's is just NOT acceptable. Thanks, Oskar |
Re: how to see what largest files are on disk?
dir /l
it lists the directory in long format, which also gives the size of any file. Also if you do a dir /? it will tell you all the options for the dir command, including one to sort the listing by size. Hope that helps. -- Kendal R. Emery, MCSE, Network+, A+, MCNGP #19 Systems Administrator Coordinated Home Care kemery@coordinatedhomecare.me.com remove me to email to me "pheonix1t" <dangeru98dousdt@ATsbcglobal.DOTnet> wrote in message news:sm08b.116$rY2.27@newssvr22.news.prodigy.com.. . > hello, > How can I tell what are the largest files on a disk or partition on > windows 2000 server? (even 2003). On unix/linux, you can use the du > (disk usage) command and then sort it by size, even output it to a file > if you want. I would like something scriptable - I have lots of win2k > servers that have mystery files on them. No documentation, so I have to > start from scratch. I intend to write a script that will determine the > file size (per disk) for each server and output the results (sorted by > size) to a file. Later on, I can put those results in a spread sheet > for easier analysis. > It's not that hard to do this on unix/linux....I've looked on the help > files and all over win2k reference books, but I can't find a command > line tool that does this. I can't sit at each server with windows > explorer poking around each folder - that's is just NOT acceptable. > > > Thanks, > Oskar > > |
Re: how to see what largest files are on disk?
Kendal Emery wrote:
> dir /l > > it lists the directory in long format, which also gives the size of any > file. > > Also if you do a dir /? it will tell you all the options for the dir > command, including one to sort the listing by size. Hope that helps. this is cool....now how can I redirect the output from the screen to a file? I need to collect this info. from a lot of machines. Also, how can I pass multiple options? I would like to tell it to use the /O option with the -S switch so it can sort in reverse order (largest first) and also use the /S option so it can dig into the subdirectories...but I still have to tell it which disk or partition? Isn't there a way to just tell it start at the root or C drive and tell me everything, even other disks or partitions? I try to pass it multiple options but it won't take it. I try to do dir /SO -S, but then I get error "Parameter format not correct". Using the dir /OS doesn't give me an output of all the subdirectories, but dir /S will. Thank you, Oskar > > -- > Kendal R. Emery, MCSE, Network+, A+, MCNGP #19 > Systems Administrator > Coordinated Home Care > kemery@coordinatedhomecare.me.com > remove me to email to me > "pheonix1t" <dangeru98dousdt@ATsbcglobal.DOTnet> wrote in message > news:sm08b.116$rY2.27@newssvr22.news.prodigy.com.. . > >>hello, >>How can I tell what are the largest files on a disk or partition on >>windows 2000 server? (even 2003). On unix/linux, you can use the du >>(disk usage) command and then sort it by size, even output it to a file >>if you want. I would like something scriptable - I have lots of win2k >>servers that have mystery files on them. No documentation, so I have to >>start from scratch. I intend to write a script that will determine the >>file size (per disk) for each server and output the results (sorted by >>size) to a file. Later on, I can put those results in a spread sheet >>for easier analysis. >>It's not that hard to do this on unix/linux....I've looked on the help >>files and all over win2k reference books, but I can't find a command >>line tool that does this. I can't sit at each server with windows >>explorer poking around each folder - that's is just NOT acceptable. >> >> >>Thanks, >>Oskar >> >> > > > |
Re: how to see what largest files are on disk?
Try dir /O /S, etc...
>-----Original Message----- >Kendal Emery wrote: > >> dir /l >> >> it lists the directory in long format, which also gives the size of any >> file. >> >> Also if you do a dir /? it will tell you all the options for the dir >> command, including one to sort the listing by size. Hope that helps. >this is cool....now how can I redirect the output from the screen to a >file? I need to collect this info. from a lot of machines. > >Also, how can I pass multiple options? I would like to tell it to use >the /O option with the -S switch so it can sort in reverse order >(largest first) and also use the /S option so it can dig into the >subdirectories...but I still have to tell it which disk or partition? >Isn't there a way to just tell it start at the root or C drive and tell >me everything, even other disks or partitions? >I try to pass it multiple options but it won't take it. I try to do dir >/SO -S, but then I get error "Parameter format not correct". >Using the dir /OS doesn't give me an output of all the subdirectories, >but dir /S will. > > >Thank you, > >Oskar > >> >> -- >> Kendal R. Emery, MCSE, Network+, A+, MCNGP #19 >> Systems Administrator >> Coordinated Home Care >> kemery@coordinatedhomecare.me.com >> remove me to email to me >> "pheonix1t" <dangeru98dousdt@ATsbcglobal.DOTnet> wrote in message >> news:sm08b.116$rY2.27@newssvr22.news.prodigy.com.. . >> >>>hello, >>>How can I tell what are the largest files on a disk or partition on >>>windows 2000 server? (even 2003). On unix/linux, you can use the du >>>(disk usage) command and then sort it by size, even output it to a file >>>if you want. I would like something scriptable - I have lots of win2k >>>servers that have mystery files on them. No documentation, so I have to >>>start from scratch. I intend to write a script that will determine the >>>file size (per disk) for each server and output the results (sorted by >>>size) to a file. Later on, I can put those results in a spread sheet >>>for easier analysis. >>>It's not that hard to do this on unix/linux....I've looked on the help >>>files and all over win2k reference books, but I can't find a command >>>line tool that does this. I can't sit at each server with windows >>>explorer poking around each folder - that's is just NOT acceptable. >>> >>> >>>Thanks, >>>Oskar >>> >>> >> >> >> > >. > |
Re: how to see what largest files are on disk?
I feel like I am teaching dos 101 :) Oh well, legitimate questions.....
Maestro answered the multiple options question. To redirect to anything..... use the redirection command ">" without the quotes, so to redirect the command in your situation use dir /O-S /S > file.txt or you can send it to your printer by dir /O-S /S > prn There is a lot of cool things like this in dos.... -- Kendal R. Emery, MCSE, Network+, A+, MCNGP #19 Systems Administrator Coordinated Home Care kemery@coordinatedhomecare.me.com remove me to email to me "pheonix1t" <dangeru98dousdt@ATsbcglobal.DOTnet> wrote in message news:ql28b.843$yR2.94@newssvr23.news.prodigy.com.. . > Kendal Emery wrote: > > > dir /l > > > > it lists the directory in long format, which also gives the size of any > > file. > > > > Also if you do a dir /? it will tell you all the options for the dir > > command, including one to sort the listing by size. Hope that helps. > this is cool....now how can I redirect the output from the screen to a > file? I need to collect this info. from a lot of machines. > > Also, how can I pass multiple options? I would like to tell it to use > the /O option with the -S switch so it can sort in reverse order > (largest first) and also use the /S option so it can dig into the > subdirectories...but I still have to tell it which disk or partition? > Isn't there a way to just tell it start at the root or C drive and tell > me everything, even other disks or partitions? > I try to pass it multiple options but it won't take it. I try to do dir > /SO -S, but then I get error "Parameter format not correct". > Using the dir /OS doesn't give me an output of all the subdirectories, > but dir /S will. > > > Thank you, > > Oskar > > > > > -- > > Kendal R. Emery, MCSE, Network+, A+, MCNGP #19 > > Systems Administrator > > Coordinated Home Care > > kemery@coordinatedhomecare.me.com > > remove me to email to me > > "pheonix1t" <dangeru98dousdt@ATsbcglobal.DOTnet> wrote in message > > news:sm08b.116$rY2.27@newssvr22.news.prodigy.com.. . > > > >>hello, > >>How can I tell what are the largest files on a disk or partition on > >>windows 2000 server? (even 2003). On unix/linux, you can use the du > >>(disk usage) command and then sort it by size, even output it to a file > >>if you want. I would like something scriptable - I have lots of win2k > >>servers that have mystery files on them. No documentation, so I have to > >>start from scratch. I intend to write a script that will determine the > >>file size (per disk) for each server and output the results (sorted by > >>size) to a file. Later on, I can put those results in a spread sheet > >>for easier analysis. > >>It's not that hard to do this on unix/linux....I've looked on the help > >>files and all over win2k reference books, but I can't find a command > >>line tool that does this. I can't sit at each server with windows > >>explorer poking around each folder - that's is just NOT acceptable. > >> > >> > >>Thanks, > >>Oskar > >> > >> > > > > > > > |
Re: how to see what largest files are on disk?
"Maestro" <maestro@nothere.com> wrote in message
news:096d01c3788f$431ee320$a001280a@phx.gbl... > Try dir /O /S, etc... I think he needs a lot more help than that. For starters, do dir /? I won't even get into output redirection yet. Let alone Windows Scripting. -- Fris "One bit at a time, lest he choke" beeŽ MCNGP #13 http://www.mcngp.tk The MCNGP Team - We're here to help |
Re: how to see what largest files are on disk?
"pheonix1t" <dangeru98dousdt@ATsbcglobal.DOTnet> wrote in message
news:ql28b.843$yR2.94@newssvr23.news.prodigy.com.. . > Kendal Emery wrote: <SNIP> > > Also, how can I pass multiple options? I would like to tell it to use > the /O option with the -S switch so it can sort in reverse order > (largest first) and also use the /S option so it can dig into the > subdirectories...but I still have to tell it which disk or partition? > Isn't there a way to just tell it start at the root or C drive and tell > me everything, even other disks or partitions? > I try to pass it multiple options but it won't take it. I try to do dir > /SO -S, but then I get error "Parameter format not correct". > Using the dir /OS doesn't give me an output of all the subdirectories, > but dir /S will. > I kind of answered this, but let me be just a tad bit clearer.... Every switch has to have the / before it, and they must be separated by a space so dir /P and dir /w together become dir /p /w if the switch has any parameters such as a -S it is put with the switch so using your example dir /O-S and dir /S become dir /O-S /S Is that clear enough? Kendal R. Emery, MCSE, Network+, A+, MCNGP #19 Systems Administrator Coordinated Home Care kemery@coordinatedhomecare.me.com remove me to email to me > > Thank you, > > Oskar > > > > > -- > > Kendal R. Emery, MCSE, Network+, A+, MCNGP #19 > > Systems Administrator > > Coordinated Home Care > > kemery@coordinatedhomecare.me.com > > remove me to email to me > > "pheonix1t" <dangeru98dousdt@ATsbcglobal.DOTnet> wrote in message > > news:sm08b.116$rY2.27@newssvr22.news.prodigy.com.. . > > > >>hello, > >>How can I tell what are the largest files on a disk or partition on > >>windows 2000 server? (even 2003). On unix/linux, you can use the du > >>(disk usage) command and then sort it by size, even output it to a file > >>if you want. I would like something scriptable - I have lots of win2k > >>servers that have mystery files on them. No documentation, so I have to > >>start from scratch. I intend to write a script that will determine the > >>file size (per disk) for each server and output the results (sorted by > >>size) to a file. Later on, I can put those results in a spread sheet > >>for easier analysis. > >>It's not that hard to do this on unix/linux....I've looked on the help > >>files and all over win2k reference books, but I can't find a command > >>line tool that does this. I can't sit at each server with windows > >>explorer poking around each folder - that's is just NOT acceptable. > >> > >> > >>Thanks, > >>Oskar > >> > >> > > > > > > > |
Re: how to see what largest files are on disk?
"Kendal Emery" <kemery@coordinatedhomecare.me.com> wrote in message
news:O$yKkwJeDHA.3224@tk2msftngp13.phx.gbl... > "pheonix1t" <dangeru98dousdt@ATsbcglobal.DOTnet> wrote in message > news:ql28b.843$yR2.94@newssvr23.news.prodigy.com.. . > > Kendal Emery wrote: > <SNIP> <SNIPPETY-DOO-DAH> > I kind of answered this, but let me be just a tad bit clearer.... > > Every switch has to have the / before it, and they must be separated by a > space You're half right. > so dir /P and dir /w together become dir /p /w or dir /p/w > if the switch has any parameters such as a -S it is put with the switch > > so using your example > > dir /O-S and dir /S become dir /O-S /S or dir /O-S/S > Is that clear enough? clear as mud -- Fris "cd backaslasha" beeŽ MCNGP #13 http://www.mcngp.tk The MCNGP Team - We're here to help |
Re: how to see what largest files are on disk?
Kendal Emery wrote:
> "pheonix1t" <dangeru98dousdt@ATsbcglobal.DOTnet> wrote in message > news:ql28b.843$yR2.94@newssvr23.news.prodigy.com.. . > >>Kendal Emery wrote: > > <SNIP> > >>Also, how can I pass multiple options? I would like to tell it to use >>the /O option with the -S switch so it can sort in reverse order >>(largest first) and also use the /S option so it can dig into the >>subdirectories...but I still have to tell it which disk or partition? >>Isn't there a way to just tell it start at the root or C drive and tell >>me everything, even other disks or partitions? >>I try to pass it multiple options but it won't take it. I try to do dir >>/SO -S, but then I get error "Parameter format not correct". >>Using the dir /OS doesn't give me an output of all the subdirectories, >>but dir /S will. >> > > > I kind of answered this, but let me be just a tad bit clearer.... > > Every switch has to have the / before it, and they must be separated by a > space > > so dir /P and dir /w together become dir /p /w > > if the switch has any parameters such as a -S it is put with the switch > > so using your example > > dir /O-S and dir /S become dir /O-S /S thank you I'm sorry that I don't know too much about DOS! I don't work on windows machines that much from a command line, I'm more familiar with shells on unix/linux. It is nice to see that people haven't forgotten their DOS though! Didn't Microsoft or someone from there say DOS is dead? I recall seeing that somewhere. Regards, Oskar > Is that clear enough? > Kendal R. Emery, MCSE, Network+, A+, MCNGP #19 > Systems Administrator > Coordinated Home Care > kemery@coordinatedhomecare.me.com > remove me to email to me > >>Thank you, >> >>Oskar >> >> >>>-- >>>Kendal R. Emery, MCSE, Network+, A+, MCNGP #19 >>>Systems Administrator >>>Coordinated Home Care >>>kemery@coordinatedhomecare.me.com >>>remove me to email to me >>>"pheonix1t" <dangeru98dousdt@ATsbcglobal.DOTnet> wrote in message >>>news:sm08b.116$rY2.27@newssvr22.news.prodigy.co m... >>> >>> >>>>hello, >>>>How can I tell what are the largest files on a disk or partition on >>>>windows 2000 server? (even 2003). On unix/linux, you can use the du >>>>(disk usage) command and then sort it by size, even output it to a file >>>>if you want. I would like something scriptable - I have lots of win2k >>>>servers that have mystery files on them. No documentation, so I have to >>>>start from scratch. I intend to write a script that will determine the >>>>file size (per disk) for each server and output the results (sorted by >>>>size) to a file. Later on, I can put those results in a spread sheet >>>>for easier analysis. >>>>It's not that hard to do this on unix/linux....I've looked on the help >>>>files and all over win2k reference books, but I can't find a command >>>>line tool that does this. I can't sit at each server with windows >>>>explorer poking around each folder - that's is just NOT acceptable. >>>> >>>> >>>>Thanks, >>>>Oskar >>>> >>>> >>> >>> >>> > > |
Re: how to see what largest files are on disk?
Kendal Emery wrote:
> "pheonix1t" <dangeru98dousdt@ATsbcglobal.DOTnet> wrote in message > news:ql28b.843$yR2.94@newssvr23.news.prodigy.com.. . > >>Kendal Emery wrote: > > <SNIP> > >>Also, how can I pass multiple options? I would like to tell it to use >>the /O option with the -S switch so it can sort in reverse order >>(largest first) and also use the /S option so it can dig into the >>subdirectories...but I still have to tell it which disk or partition? >>Isn't there a way to just tell it start at the root or C drive and tell >>me everything, even other disks or partitions? >>I try to pass it multiple options but it won't take it. I try to do dir >>/SO -S, but then I get error "Parameter format not correct". >>Using the dir /OS doesn't give me an output of all the subdirectories, >>but dir /S will. >> > > > I kind of answered this, but let me be just a tad bit clearer.... > > Every switch has to have the / before it, and they must be separated by a > space > > so dir /P and dir /w together become dir /p /w > > if the switch has any parameters such as a -S it is put with the switch > > so using your example > > dir /O-S and dir /S become dir /O-S /S > > Is that clear enough? that's cool...so I ran from a c: prompt dir /S /O-S > dump.txt but this gave me only the info. on the c drive. What about other drives or partitions? Do I have to write the script telling it to look for the other partitions? So, I still have to visit each machine to see how many drives/partitions it has? Thanks, Oskar > Kendal R. Emery, MCSE, Network+, A+, MCNGP #19 > Systems Administrator > Coordinated Home Care > kemery@coordinatedhomecare.me.com > remove me to email to me > >>Thank you, >> >>Oskar >> >> >>>-- >>>Kendal R. Emery, MCSE, Network+, A+, MCNGP #19 >>>Systems Administrator >>>Coordinated Home Care >>>kemery@coordinatedhomecare.me.com >>>remove me to email to me >>>"pheonix1t" <dangeru98dousdt@ATsbcglobal.DOTnet> wrote in message >>>news:sm08b.116$rY2.27@newssvr22.news.prodigy.co m... >>> >>> >>>>hello, >>>>How can I tell what are the largest files on a disk or partition on >>>>windows 2000 server? (even 2003). On unix/linux, you can use the du >>>>(disk usage) command and then sort it by size, even output it to a file >>>>if you want. I would like something scriptable - I have lots of win2k >>>>servers that have mystery files on them. No documentation, so I have to >>>>start from scratch. I intend to write a script that will determine the >>>>file size (per disk) for each server and output the results (sorted by >>>>size) to a file. Later on, I can put those results in a spread sheet >>>>for easier analysis. >>>>It's not that hard to do this on unix/linux....I've looked on the help >>>>files and all over win2k reference books, but I can't find a command >>>>line tool that does this. I can't sit at each server with windows >>>>explorer poking around each folder - that's is just NOT acceptable. >>>> >>>> >>>>Thanks, >>>>Oskar >>>> >>>> >>> >>> >>> > > |
| All times are GMT. The time now is 04:40 AM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.