Operating Systems & Environments
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.
Install deprecated php-fpm version in Mac
Install deprecated php-fpm version in Mac
in some cases you will need to Install deprecated php-fpm version in Mac and this is no possible with these commands
brew tap shivammathur/php
brew install shivammathur/php/[email protected]
adding alias to use it
#echo 'alias php7.1="/opt/homebrew/opt/[email protected]/bin/php"' >> ~/.zshrc
#source ~/.zshrc
Optimizing HyperV External Switch Setup for Faster Up and Download Speeds
"Optimizing HyperV External Switch Setup for Faster Up and Download Speeds
Are you experiencing sluggish upload and download speeds with your HyperV external switch configuration? We have the solutions you need to boost your network performance.
Slow Download Speeds:
To enhance your download speed, follow these steps:
Disable packet coalescing in your Wi-Fi card settings within the Device Manager.
Slow Upload Speeds:
For improved upload speeds, take these actions:
Open specific Port in Centos
to Open a specific port in centos you need to use these commands
firewall-cmd --zone=public --add-port=10000/tcp --permanent
then reload the firewall
firewall-cmd --reload
Create ISO file for Mac OS system (Monterey)
The below commands will help you create the iso file
this command will download the newest version.
- softwareupdate --fetch-full-installer
1- to install MacOS Monterey use the below command
- softwareupdate --fetch-full-installer --full-installer-version 12.0.1
2- we must create a temporary disk image:
hdiutil create -o /tmp/Monterey -size 12500m -volname Monterey -layout SPUD -fs HFS+J
3- Next, mount the disk image:
Copy file from a server using SSH command
Copy file from a server using SSH command
if we ant to use SSH command to copy a file to local folder we can use scp command
here is the main command
scp {SSH connection}:{full file path} /tmp/local
here is an example
scp ssh [email protected]:/user/zippedfile.zip /local
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
,
SENDMAIL on MAC OSX Yosemite
SENDMAIL on MAC OSX Yosemite
http://www.garron.me/en/mac/postfix-relay-gmail-mac-os-x-local-smtp.html
1) Create a file to store our credentials:
sudo vim /etc/postfix/sasl_passwd
2) Add something like this:
smtp.gmail.com:587 username@gmail.com:password
3) Now run:
Add Cron Job to backup the server log for custom websites
Some time we want to configure the log for every website in a specifc folder here is how to add a cronjon for the last 10 days
37 3 * * * /usr/sbin/logrotate -f -s /var/www/share/etc/logrotate/{website_name}.status /var/www/share/etc/logrotate/{website_name}.conf
where {website_name} any name you want
now what is the content of the {website_name}.conf
here is an example
Install icu4c version 64 with Homebrew
download the homebrew core first
git clone https://github.com/Homebrew/homebrew-core.git
check current installed version
brew list --versions icu4c
1) cd
to Homebrew's formula directory
cd $(brew --prefix)/Homebrew/Library/Taps/homebrew/homebrew-core/Formula
2) Find desired commit (version 63 for icu4c
) to checkout
git log --follow icu4c.rb