<?php /* @var $installer Mage_Core_Model_Resource_Setup */ $installer = $this; $installer->startSetup(); $collection = Mage::getModel('catalog/product')->getCollection() ->addAttributeToSelect('*') ->addAttributeToFilter('type_id', 'simple'); foreach ($collection as $product) { $stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($product->getId()); $stockItem->setData('manage_stock', 1); $stockItem->setData('use_config_manage_stock', 1); $stockItem->save(); } $installer->endSetup(); ?>
SCP
You can do this with the scp
command, which uses the ssh protocol to copy files across machines. It extends the syntax of cp
to allow references to other systems:
scp username1@hostname1:/path/to/file username2@hostname2:/path/to/other/file
Copy something from this machine to some other machine:
scp /path/to/local/file username@hostname:/path/to/remote/file
Copy something from another machine to this machine:
scp username@hostname:/path/to/remote/file /path/to/local/file
Copy with a port number specified:
scp -P 1234 username@hostname:/path/to/remote/file /path/to/local/file