Quantcast
Channel: VMware Communities : Discussion List - VMware ESXi 5
Viewing all articles
Browse latest Browse all 20614

3 simple esxi commandline questions

$
0
0

Hello
I have 3 simple questions about ESXi-shell commands

 

 

1. how do I run a dd command and gzip the results without storing the of-file somewhere ?

 

 

/tmp # dd if=/vmfs/devices/disks/mpx.vmhba1\:C0\:T0\:L0:1 of=/tmp/dd.dump bs=1M count=20

/tmp # gzip -c dd.dump > dump.gz

 

instead of those 2 lines do it all in one without storing dd.dump

 

 

 

2. how do I create a list of all vmx-files in a datastore without also listing  *.vmxf or files that have vmx in the name like vmx-blabla.vmdk
the output must use full paths so I need something like this but without the false results

 

find /vmfs/volumes/datastore1/* | grep ".vmx" | grep -v ".vmxf" > vmx-files.list

 

 

3. how do I grep all vmware*.log files in a datastore for a complex string like "scsi0:0.filename = " and pipe the results in a file that lists the results like

 

/vmfs/volumes/datastore1/test/test.vmware.log: 2012-10-01T07:19:00.120Z| vmx| DICT          scsi0:0.fileName = WIN02.vmdk

/vmfs/volumes/datastore1/test2/test2.vmware.log: 2012-10-02T07:19:03.120Z| vmx| DICT          scsi0:0.fileName = test2.vmdk

 

Thanks in advance


Viewing all articles
Browse latest Browse all 20614

Trending Articles