[PLUG] Linux question - Device of the CWD
Randal L. Schwartz
merlyn at stonehenge.com
Thu Mar 12 14:08:58 UTC 2009
>>>>> "Roderick" == Roderick A Anderson <raanders at cyber-office.net> writes:
Roderick> Randal L. Schwartz wrote:
>>>>>>> "Roderick" == Roderick A Anderson <raanders at cyber-office.net> writes:
>>
Roderick> df . | grep ^/dev | cut -d ' ' -f 1
>>
>> Beware... I've seen df wrap the first column on a long device name, like:
>>
>> /dev/
>> somereallylongmountpoint
Roderick> OOPS! I was only seeing the line after the device name wrap.
Yes, I point this out because *most* of the time, it works,
but I got burned once on an automated tool I wrote because I didn't
realize it wraps occasionally.
And this was BSD, so it might not apply to the GNU versions.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion
More information about the PLUG
mailing list