portlandhilt.blogg.se

Linux clean disk
Linux clean disk








linux clean disk

$ rm -rf /home/*/.composer/cache 6- Remove core dumps #If some severe failures with PHP and core dumps enabled $ package-cleanup -oldkernels -count=2 5- Remove Composer cache & WP CLI cached WordPress downloads # WordPress new setup site cache $ package-cleanup -quiet -leaves -exclude-bin | xargs yum remove -y 4- Remove out dated kernels # Keeps only latest two kernels, Note: reboot first in order to boot up from # latest kernel. $ package-cleanup -quiet -leaves -exclude-bin $ rm -rf /var/tmp/yum-* # Delete regular user cache 3- Remove Orphan Packages # Check existing orphan packages $ rm -rf /var/cache/yum # Remove orphaned data $ find /var -name "*.log" \( \( -size +50M -mtime +7 \) -o -mtime +30 \) -exec truncate -size 0 \ 2- Clean Yum Cache $ yum clean all

#LINUX CLEAN DISK INSTALL#

$ yum -y install yum-utils 1- Trim Log Filesįollowing command will truncate any *.log files on the volume /var that are either older than 7 days and greater than 50M or older than 30 days. $ df -output=source,used,avail /data/ Output Options Human Readable Clear disk space on CentOSįollowing are quick commands to clear disk space on CentOS 6 or CentOS 7 servers. You can pass the output format defined by ‘valid field name’ as follows: The source of the mount point, usually a device. The syntax is: btrfs filesystem df /path/ $btrfs fi df /dev/path

  • For btrfs filesystem use the btrfs fi df command to see space usage information for a mount point.
  • Pass the -a or –all option to the df command to show all file system.
  • To list all but exclude ext2 filesystem pass the -x TYPE option.
  • linux clean disk linux clean disk

    Pass -t TYPE to only see specific file system liek $ df -t ext3.Pass the -T option to display the type of each file systems listed such as ext4, btrfs, ext2, nfs4, fuse, cgroup, cputset etc.Display output using inode usage instead of block usage like $ df -i.Pass the -h option to see output in human readable format size in gigabytes or terabytes or megabytes: like $ df -h.$ btrfs fi df /device/ – Show disk space usage information for a btrfs based mount point/file system.$ du command – Display the amount of disk space used by the specified files and for each sub-directory.$ df command – Shows the amount of disk space used and available in file systems.










    Linux clean disk