zip -r foo.zip dir_path
----------------------------------------------------------------
grep -Ril "text-to-find-here" /path
find -name 'filename'
find . -name '*.js' -exec grep -i 'string to search for' {} \; -print
----------------------------------------------------------------
pwdx <process id>
This command will fetch the process path from where it is executing.
----------------------------------------------------------------
List number of files in current directory
du -a | cut -d/ -f2 | sort | uniq -c | sort -nr
----------------------------------------------------------------
composer install --ignore-platform-reqs
----------------------------------------------------------------
Start:
sudo /etc/init.d/mysql start
Stop:
sudo /etc/init.d/mysql stop
Restart / reload configs:
sudo /etc/init.d/mysql restart
Check run status:
sudo /etc/init.d/mysql status
------
tar -czvf media/bk.tar.gz ./ --exclude="media/*" --exclude="var/*" --exclude="v/*" --exclude="errors/*"
This works exclude files and folder
tar --exclude=*.tar --exclude='var/*' --exclude='pub/US' --exclude='pub/static' -cvzf mojow-bkp-2019-06-12.tar ./
----------------------------------------------------------------
folder files count
ls | wc -l
----------------------------------------------------------------