If you want to check the directory size in Linux, you can use this command: du -sh path_to_directory This will give you the total size of the said directory in human-readable format, i.e. KB, MB or GB. I am going to show you various examples of the du command that you can use...
Ubuntu users can also use top command to check memory and cpu usage per process. It reports total memory usage and also total RAM usage by the processes. The top program provides a dynamic real-time view of a running system. It can display system summary information as well as a list of...
This is our ongoing series ofLinux commandsand in this article, we are going to reviewlsofcommand with practical examples.lsofmeaning‘LiSt Open Files’is used to find out which files are open by whichLinux process. As we all knowLinux/Unixconsiderseverything as a file(pipes,sockets,directories...
On the internet, you will find plenty of tools forchecking disk space usagein Linux. However, Linux has a strong built-in utility called ‘df‘. The ‘df‘ command stands for “disk filesystem“, it is used to get a full summary of available and used disk space usage of the file sys...
It is important to note that some switches are intended for temporary cases and may break in the future. Note that if you look at chrome://flags to see if the command line option is active, the state might not be accurately reflected. Check chrome://version for the complete command line...
Check ext2, ext3, or ext4 filesystems. 5 e2fsck Examples 1. Check a partition You should be root to execute this command. If not, you’ll get the following error message. $ /sbin/e2fsck /dev/sdb1 e2fsck 1.35 (28-Feb-2004) ...
There are two popularways to check disk usage in Linux terminal: du command and df command. Thedu command is more for checking the space used by a directoryand the df command gives you the disk utilization on filesystem level. The gdu tool sorts of combined the functionality of both. ...
Use the following command to copy a file:cp /etc/passwd . Check the content of a directory. What's the filename? What is the size of this file? Copy some more files using this command:cp /etc/aliases /etc/os-release /etc/legal . ...
# append to the history file, don't overwrite it shopt -s histappend # for setting history length see HISTSIZE and HISTFILESIZE in bash(1) HISTSIZE=1000 HISTFILESIZE=2000 # check the window size after each command and, if necessary, ...
创建临时目录或文件,Linux 使用 /tmp 目录来存放不需要永久保留的文件,大多数 Linux 发行版配置了系统在启动时自动删除 /tmp 目录的所有文件。默认情况下, mktemp 会在本地目录中创建一个文件,只要指定一个文件名模板就行,模板可以包含任意文本文件名,在文件名末尾加上 6 个X 就行了。