disk space

maxwell.2k19

New Member
Joined
Jul 27, 2020
Messages
3
Reaction score
1
Credits
36
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?
 


1. how can i know how many files and directories this dir2 has.
You could always study, do your homework, read your textbook, pay attention during class, etc. etc,
 
Running cat /etc/os-release should give you the version, code name, websites for the home and support of your distro and a website for reporting bugs.
 

Members online


Top