1849648 Members
6804 Online
104044 Solutions
New Discussion

Re: Disk excercice

 
SOLVED
Go to solution
farhi
Advisor

Disk excercice

Thank you for your answering, but my question is very specific: which of the following commands "cat, cp, mv and more" can excercice the Disk without harm data.
Hold to forgiveness; command what is right; but turn away from the ignorant.
4 REPLIES 4
Stefan Farrelly
Honored Contributor

Re: Disk excercice


cat or cp. If you cp or cat the files to /dev/null that should exercies the read element of your disk. I would use cp, cat may pick up control characters in some files and thus do some strange things to your display.
Im from Palmerston North, New Zealand, but somehow ended up in London...
CHRIS_ANORUO
Honored Contributor

Re: Disk excercice

dd will exercise your disk without harm to data
mv will move your data to another specified area.
cp does not exercise disk as dd does and it does not destroy data
cat and more will allow you to page file information for viewing and will not
damage data unless binary and machine file. I will advise that you use 'file'
before using vi to check the file if you don't really know the file format
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Andreas Voss
Honored Contributor

Re: Disk excercice

Hi,

i'm not clear what you want.
Why exercising with cat,mv,cp, more ?
Do you want to read from disk device or filesystem ?
All 4 commands can be used to read or write from/to a file.
Writing to device is very dangerous.
Read will never harm any data.

Regards
Carol Garrett
Trusted Contributor
Solution

Re: Disk excercice


Agreed cp is not as good as dd but thats not the question, the question was which of those commands is best to use for disk exercising. Using time cp to copy all the files on an lvol/disk to /dev/null would still be a good exerciser of a disks read speed, eg;

cd /tmp
time find . -type f -exec cp /dev/null {} \;