Th Most Handy du (Disk Usage) Commands in Linux

du is a command line tool shipped with Linux that reports the amount of disk space used by directories and files. Short for “disk usage,” du is the primary tool for analyzing disk space in the command line. Basic Usage du /path/to/directory Run the du command with a directory to see a complete analysis of the disk space taken up by each directory. Each directory will be listed in turn in standard output, so large directories or full system scans may produce tens of thousands of lines and take considerable time. As a result, the… Read more

How to Check Shutdown and Reboot Date in Linux

There are plenty of reasons why you’d want to find out when your Linux computer shut down, restarted, or how long it’s been running. Most of the time this information is invaluable in debugging a problem that may have happened when no one was looking. Thankfully, Linux meticulously logs system events automatically on most distributions. Accessing that logged information from the command line is a breeze as well. Last Boot First, if you want to check when your computer last booted up, you can use the who command with the -b flag to get an exact date and time in your terminal. You don’t… Read more

How to Run Automatic Commands at Command Prompt/Powershell Start

If you work with a computer long enough, you’ll end up developing a few workflows. These can be simple or complex, but it’s likely you’ll end up with a few that are unique to you. The more you do with your computer, the more likely you’ll end up using the Command Prompt or the more powerful PowerShell. Sometimes you might find yourself running the same few commands every time you launch PowerShell or the command prompt. Instead, why not save some time and run them automatically on launch? What Can You Do with Automatic Commands? You may have a workflow that sees you creating a… Read more

SCP vs SFTP: Which One Should You Use for File Transfer

SCP (Secure Copy Protocol) and SFTP (Secure File Transfer Protocol) are alternatives for FTP (File Transfer Protocol), which is useful for local, non-scheduled file transfers. All three can help accomplish moving files from one location to another over Ethernet. However, FTP sends data in plain text, while the other two use the Secure Shell (SSH) protocol for communication. What Is SCP and SFTP? SCP (Secure Copy Protocol) This is a non-interactive file transfer that uses the shell and a remote command only, to securely transmit files between two computers. This is a secure version of the previous RCP, and FTP uses the SSH protocol… Read more