In Linux, the df and du commands for viewing files and folders will trigger an alarm when the disk size exceeds the standard. In this case, it is wise to master the df and du commands. Df allows you to view the size, usage ratio, file system, and its mount point of a level-1 folder, but there is nothing to do with files. Du allows you to view the file and folder
View the file system usage and size of the folder in the Linux system:1,DF command can display all the current file system free space and use case[Email protected] linux_kernel]# df-hFilesystem Size used Avail use% mounted on/dev/sda2 28G 5.1G 21G 20%/Tmpfs 504M 228K 503M 1%/DEV/SHM/DEV/SDA1 291M 33M 244M 12%/boot2. The du command displays the size of the folder[
are deleted.
(2) If you are prompted that you do not have the permission to run the command, you can use sudo to escalate the user's permission and then execute the command.Articles you may be interested in
Linux chmod (file or folder permission setting) command parameters and Usage Details
Linux File Content statistics command wc command usage details
The shell script deletes the folder N days ago. The date commands on linux and mac are different,
Background:Every day you build things and put them in different folders by date. For example, today's construction is put in, tomorrow's will be put in, and so on. After a long time, you need a script to delete the folder N days ago. (N = 7 in this example, that is,
1. Linux Delete Folder commandWhen using Linux, sometimes to delete a folder, will often prompt this file is not empty, can not be deleted, this time, you must use the RM-RF command. 2. Linux Delete folder instance:Rm-rf/var/log/h
Http://lizzy115.blog.163.com/blog/static/36491958201010254255320/
In Embedded Linux systems, some real-time data is often stored. However, when the storage space is limited, it is often necessary to determine the size of folders in the storage directory, there are few programs that can be used to obtain the folder size through the C language on the Internet. Now we provide a program for everyone to share a
under the current directory and do not want to look at other directories and their subdirectories:Du-sh user-s The meaning of the summary, which lists only one summarized value du-h--max-depth=0 user--max-depth=n represents depth to the N-tier directory, which is set to 0, which means that it is not drill-down to subdirectories. 7> Lists the size of all directories and files under the user directory and its subdirectories:Du-ah user-a representation includes directories and files 8> lists the s
Linux file structure to see what each folder is used for/bin binary Executable command/dev Device Special files/etc system administration and configuration files/ETC/RC.D startup configuration files and scriptsThe base point of the home user directory, such as the user's home directory is/home/user, can be represented by ~user/lib Standard Programming Library, also known as dynamic Link shared library, acts
process opens a large file, the large file is dropped directly by RM or MV, then du updates the statistics, DF does not update the statistics, or the space is not released. Until the process of opening the large file was killed. As a result, if you delete the file below/var/spool/clientmqueue periodically, the space is not released until you kill the process. After you kill the process using the following command, the system resumes.Fuser-u/var/spool/clientmqueue http://www.yayu.org/look.php?id
dropped directly by RM or MV, then du updates the statistics, DF does not update the statistics, or the space is not released. Until the process of opening the large file was killed.As a result, if you delete the file below/var/spool/clientmqueue periodically, the space is not released until you kill the process.After you kill the process using the following command, the system resumes.Fuser-u/var/spool/clientmqueuehttp://www.yayu.org/look.php?id=162View the size of the
(Filesystem) and the last field (mounted on) of the above command output are the file system and its hang-in points respectively. We can see that this partition of/DEV/SDA1 is hung in the root directory.The next four fields size, used, Avail, and use% are the partition's capacity, the size used, the remaining size, and the percentage used. Under FreeBSD, when the hard drive is full, you mayYou will see that the percentage used is more than 100%, because FreeBSD will leave some space for root, s
The TMP folder in Linux is like the Temporary Folder of TMP temporary file.
(1) Since it is a temporary folder, the content in this folder will be cleared. Why does the content in this folder still exist after I restart my comput
Source: Internet anonymous time: 05-01 20:46:07 "Big Small"In Linux to modify the permissions of a folder or file we need to use the Linux chmod command to do, below I wrote a few simple examples you can refer toSyntax: chmod [who] [+ |-| =] [mode] File nameThe meaning of each option in the command isU means "user", which is the owner of the file or directory.G m
another location: Cp-r + folder + Directory locationOperations on a directoryFirst, make it clear that the main scope of a user activity is/home/username, such as I am/home/abram. If you want to "move the knife" in the other directory of root, it involves troublesome permissions, in short, may be less than root.Enter directory: CD # Memory: CD change Directroy changing directory# Assuming that starting in the user directory such as:/home/abram,
Introduction to Folder-related functionsmkdir Function Create folder#include RmDir Deleting a folder#include Dopendir/fdopendir//Open FolderDir is a struct that is an internal structure used to store information about a read folder.DIR *opendir (const char *name);D ir *fdopendir (int fd);Readdir Read folder#include Rea
Linux Delete Folder commandLinux Delete directory is very simple, many people are still accustomed to use rmdir, but once the directory is not empty, it fell into deep distress, now use the RM-RF command.Direct RM is available, but add two parameters-rf that is: RM-RF directory nameDelete directory, file rm (remove)Feature Description: Delete files or directories.Syntax: RM [-dfirv][--help][--version][file
When using ftp in Linux, pay attention to the folder permission settings-Linux Enterprise Application-Linux server application information. The following is a detailed description. In debian, it is unclear how to write the format in/etc/apt/sources. list. I read several articles today and figured out some points.
Be
These days have been practicing driving, building a simple cross-compilation environment, cross-compiling tool chain and the Development Board source code are in the Linux directory, and decompression, but a simple cross-compiler command will always appear a strange error hint:as:unrecongnized option ' mcpu=xxx ';Think of the solution, and then after a lab brother's tips, finally understand. Here's a background to explain:I am a driver development exe
The DF command can show the available space and usage for all current file systems, and see the following example:
The following is a code fragment:
The code is as follows
Copy Code
[Yayug@yayu ~]$ Df-hFileSystem Size Used Avail use% mounted on/DEV/SDA1 3.9G 300M 3.4G 8%//dev/sda7 100G 188M 95G 1%/data0/DEV/SDB1 133G 80G 47G 64%/data1/dev/sda6 7.8G 218M 7.2G 3%/var/dev/sda5 7.8G 166M 7.2G 3%/tmp/dev/sda3 9.7G 2.5G 6.8G 27%/usrTmpfs 2.0G 0 2.0G 0%/dev/shm
Rename a file or folder in Linux (mv command and rename Command)
You can use the mv or rename command to rename a file or directory in Linux. Here we will share the usage of both.
The mv command can be renamed, and files or folders can be moved.
Example: Rename directory A to directory B
Mv A B
Example: Move the/a directory to/B and rename it to c
Mv/a/B/c
In tex
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.