Formatting USB drives in Linux from the command line (terminal) is very easy. In this note i will show how to format an external HDD, SSD or USB flash drive in Linux from the command line using mkfs utility. I will provide the examples of disk formatting to the most popular file system types: FAT32, […]
command-line
HowTo: Generate and Print a Sequences of Numbers with BASH
You don’t have to type a range of numbers by hands! BASH already has a built-in utility, named seq, for generating and printing a sequence of numbers. Generate a sequence of numbers Syntax: seq [OPTION]… FIRST Syntax: seq [OPTION]… FIRST LAST Print a sequence of numbers from 1 to 10: $ seq 1 5 1 […]
HowTo: Count Number of Files in a Directory
Here are the best ways of finding and counting the number of files or folders in a particular directory. Count the number of files in a current directory Using “ls” command: This method is the best, if you need to count a large number of files. $ ls -f . | wc -l This command […]
HowTo: Find Large Files in Linux
Finding the largest files is extremely useful especially when you you’re low on disk space and want to free it up. The best way to find the largest files on your Linux system is to use the command line. Actually there is no simple command to list the largest files in Linux. However, you can […]