- Logon on to your server – ssh root@192.168.100.100
- Navigate to the folder. cd /content/logs
- Type du -sh to view storage in GB for the folder.
- To clear the contents for file name : log-we.log
- echo “” > log-we.log
linux
Yarn Installation
When installing yarn in ubuntu use the command below.
Remember not to use apt install yarn
sudo apt remove cmdtest
sudo apt remove yarn
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update
sudo apt-get install yarn -y
Updating time in Centos server
To update time to Nairobi, Kenya
Enter the follwoing commands
sudo mv /etc/localtime /etc/localtime.bak
sudo ln -s /usr/share/zoneinfo/Africa/Nairobi /etc/localtime
Changing Time in Centos
When changing time in centos, use the following format.
sudo mv /etc/localtime /etc/localtime.bak
sudo ln -s /usr/share/zoneinfo/Africa/Nairobi /etc/localtime
Search for large files
In Linux sometimes you need to locate the largest file in your system. To do so, you need to select the mount location when searching.
sudo du -aBm / 2>/dev/null | sort -nr | head -n 10