How to get a count of how much disk space your Linux installation is taking up.

Getting information about how much disk space your Linux installation is taking up is very easy. The du command can print disk usage. This example is used on my WSL2 Kali Linux installation. ┌──(john㉿DESKTOP-PF01IEE)-[~] └─$ sudo du -hl –exclude=/{proc,sys,dev,run,mnt} / | awk ‘END {print $1 " Space used on " $2}’ 6.5G Space used on … Read more

How to log CPU usage over a period of time on Linux.

Logging CPU usage over a certain period of time is very easy. The command below will print 24 lines of CPU statistics, printing a line every 4 seconds. ┌──[[email protected]]─[~] └──╼ ╼ $ sar -u 4 24 –human Linux 5.8.0-41-generic (jason-desktop) 12/04/21 _x86_64_ (4 CPU)   09:05:33 CPU %user %nice %system %iowait %steal %idle 09:05:37 all … Read more

Get information about filesystem usage with the MATE Disk Usage Analyser.

The MATE Disk Usage Analyser is a very good way to get disk usage information in a graphical fashion. The above example, shows the usage on the whole Linux filesystem. MATE Disk Usage Analyser showing information about my home directory. The user can click each folder to view disk usage information about a certain folder, … Read more

Search your Linux machine for information about a certain package.

To find information about a certain package on a Linux machine, the man command is very useful, but it does not show all man pages that could contain valuable information. The apropos command is what is required to find all pertinent information. This example below shows how to use this command to find all manual … Read more

Use the find command in Linux to look for multiple file types at once.

The Linux find command is useful for finding files on your Linux system. It is possible to look for more than one file type. This example will search for all text and png files under the /usr/share directory. jason@neo:/usr/share$ find -regex ‘.*txt\|.*png’jason@neo:/usr/share$ find -regex ‘.*txt\|.*png’ This example will search for three different file types. jason@neo:/usr/share$ … Read more

Get information about your network connection with netstat on Windows.

Get network information on Windows with netstat Netstat on Windows can provide a lot of information about your network connection. This example shows netstat showing Ethernet statistics. c:\Windows\System>netstat -e Interface Statistics   Received Sent   Bytes 2307072092 27407417 Unicast packets 1757202 320154 Non-unicast packets 0 0 Discards 0 0 Errors 0 0 Unknown protocols 0c:\Windows\System>netstat … Read more

How to see free memory on a Linux machine with the free command.

The free command in Linux is used to show the amount of free memory in Linux. The example below shows the default usage of this command. ubuntu@ip-172-31-0-140:~$ free total used free shared buffers cached Mem: 602736 294680 308056 16928 17632 146320 -/+ buffers/cache: 130728 472008 Swap: 0 0 0ubuntu@ip-172-31-0-140:~$ free total used free shared buffers … Read more

Basic text filtering with sed. Very useful when you are manipulating text files.

This example uses sed to replace the beginning word of a sentence. Administrator@WIN-EM8GK0ROU41 ~ $ echo "this is a line of text." | sed "s/this/This/gi;" This is a line of text.Administrator@WIN-EM8GK0ROU41 ~ $ echo "this is a line of text." | sed "s/this/This/gi;" This is a line of text. This is a better way to … Read more

Linux Mint 15 distribution coming out in May 2013 and thoughts on Linux in general.

The newest edition of the Linux Mint distribution, “Olivia” will be available from May 2013. This edition is named after the Olive tree and will provide more of the quality Linux goodness that we have come to expect from a quality Linux distribution. This distro will maintain quality and will not stoop to adding Amazon … Read more

Using the iostat command to keep track of disk usage on Linux.

This example shows the iostat command printing information about disk usage on my Ubuntu system. jason@jason-desktop:~$ iostat Linux 4.6.0-rc1-jason (jason-desktop) 01/05/16 _x86_64_ (4 CPU)   avg-cpu: %user %nice %system %iowait %steal %idle 2.50 0.43 1.28 24.37 0.00 71.42   Device: tps kB_read/s kB_wrtn/s kB_read kB_wrtn sda 1.49 147.22 0.00 64455 0 sdb 0.41 14.30 0.00 … Read more

How to use aliases with the bash shell and some other useful Linux tricks.

Are you wanting to create an alias and you want to see how they are done? Well a Linux distribution should come with some aliases that are already created for you and you can type the alias ls command to see how one is created. ubuntu@ubuntu:~$ alias ls alias ls=’ls –color=auto’ubuntu@ubuntu:~$ alias ls alias ls=’ls … Read more

How to rip a DVD on Ubuntu 12.10 Quantal Quetzal. The Acid::Rip application explained.

I was trying to install the Handbrake application on Ubuntu to rip a couple of DVDs and I had no luck as the dependencies were broken. So I installed the Acid::Rip package instead and that gave me a nice front-end to the mencoder DVD ripping and transcoding application. All you need to do is set … Read more

Using the UNIX/Linux sleep command to pause a shell script or command for a short time. And other useful commands.

The Linux sleep command will enable you to pause a Linux command for a short time. The example below has our command halting for 5 seconds before executing. The suffix s means seconds, this is useful for halting a script whilst you are waiting for something else to run. C:\HOME\FLYNN\DESKTOP> sleep 5s ; ps PID … Read more

Using the tar command on Debian Linux.

The Linux shell offers many ways to compress files for backup. The tar or tape archive program will concantenate many files into one. tar –create –verbose myfile.tar file1 file2 file3 file4tar –create –verbose myfile.tar file1 file2 file3 file4 Then you may use either the gzip or bzip commands to compress the myfile.tar file you have … Read more