disk space
by maxwell2k19 from LinuxQuestions.org on (#5GC4G)
Hi All
i am new to linux and i am learning it. i have a disk space issue on one server
[root@server01 /]# df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/sdb1 ext4 1000G 1000G 0 100% /data
i have used the below syntax to get the files above 100M
find /data -xdev -type f -size +100M | xargs du -sh * | sort -hr | head -30
i have a directory by name dir2 under /data/dir1/dir2 which is occupying space.it has lot of files each of 10MB.
1. how can i know how many files and directories this dir2 has.
2. How many files in the dir2 have above 10MB and less than 10MB
3. how can i know the files which have been modified in last 7 days in dir2.
4. i want to keep the files of last 7 days which includes modified files and delete the rest of the files in dir2. how can i delete.
5. To know the OS version will the command cat /etc/os-release give me OS version in RHEL,Centos,SUSE linux?


i am new to linux and i am learning it. i have a disk space issue on one server
[root@server01 /]# df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/sdb1 ext4 1000G 1000G 0 100% /data
i have used the below syntax to get the files above 100M
find /data -xdev -type f -size +100M | xargs du -sh * | sort -hr | head -30
i have a directory by name dir2 under /data/dir1/dir2 which is occupying space.it has lot of files each of 10MB.
1. how can i know how many files and directories this dir2 has.
2. How many files in the dir2 have above 10MB and less than 10MB
3. how can i know the files which have been modified in last 7 days in dir2.
4. i want to keep the files of last 7 days which includes modified files and delete the rest of the files in dir2. how can i delete.
5. To know the OS version will the command cat /etc/os-release give me OS version in RHEL,Centos,SUSE linux?