UNIX Shell :
The UNIX shell is a program that serves as the interface between the user and the UNIX operating system. It is not part of the kernel, but communicates directly with the kernel. The shell translates the commands you type in to a format which the computer can understand. User -> Shell -> Kernal -> Hardware.
Run Some Set Of Command in Magento2 like upgrade and compile.
Go to /usr/bin directory and create file magento.sh.Inside it paste below code.
That commnd will run all command that defines in magento.sh.
Find all files containing specific text on Linux:
The UNIX shell is a program that serves as the interface between the user and the UNIX operating system. It is not part of the kernel, but communicates directly with the kernel. The shell translates the commands you type in to a format which the computer can understand. User -> Shell -> Kernal -> Hardware.
Run Some Set Of Command in Magento2 like upgrade and compile.
Go to /usr/bin directory and create file magento.sh.Inside it paste below code.
echo "Change Permission of var folder";
sudo chmod 777 -Rf /var/www/html/project/var/*
echo "change permision of pub folder";
sudo chmod 777 -Rf /var/www/html/project/pub/*
echo "Running Module Upgrade Command";
php /var/www/html/project/bin/magento setup:upgrade
echo "Running of Static Content Deploy Command";
php /var/www/html/project/bin/magento setup:static-content:deploy
echo "Change Permission of var folder";
sudo chmod 777 -Rf /var/www/html/project/var/*
echo "change permision of pub folder";
sudo chmod 777 -Rf /var/www/html/project/pub/*
Run command from terminal ./magento.shThat commnd will run all command that defines in magento.sh.
Find all files containing specific text on Linux:
grep -r "string to be searched" /path/to/dir
Comments
Post a Comment