Linux
Install PM2 on Cloudways
Install PM2 on Cloudways
to install PM2 on Cloudways you can run the below script, but note that you will need to use the master account
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash &&
\. "$HOME/.nvm/nvm.sh" &&
nvm install 22 &&
node -v &&
npm -v &&
npm i -g pnpm pm2
How to Delete Excessive Files from a Directory (linux)
Delete Excessive Files in a Directory:
If your system is slowing down due to too many files in a directory, you need a reliable way to delete excessive files in a directory efficiently. Overloaded directories can cause performance issues and take up unnecessary disk space.
How do I find all files containing specific text on Linux?
How do I find all files containing specific text on Linux?
grep -rnw '/path/to/somewhere/' -e 'pattern'
-r
or-R
is recursive,-n
is line number, and-w
stands for match the whole word.-l
(lower-case L) can be added to just give the file name of matching files.-e
is the pattern used during the search
Along with these, --exclude
, --include
,
Linux : analyses the running process
Use htop
or top
to analyses the running process
run also ps auxf to see a detailed status of the current running processes.
Linux Move Directory Command Line
To move SOURCE directory to a DEST directory use the mv command as follows:
mv source dest
mv /path/to/source /path/to/dest
Find all XML files that have been changed in last 24 hours
You can use this command to find it
find . -name "*.xml" -mtime -1 -ls