LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-28-2016, 12:20 AM   #1
arun natarajan
Member
 
Registered: Jun 2014
Posts: 111

Rep: Reputation: Disabled
1tb file is available from 40gb harddisk


hi all,

when i tried to find large files in harddisk, found 1tb file /proc/kcore from 40gb harddsik. how it is possible ?

my setup:

installed rhel 6.0 on vmware workstation 10.0

[root@client ~]$ uname -a
Linux client.11.example.com 2.6.32-71.el6.x86_64 #1 SMP Wed Sep 1 01:33:01 EDT 2010 x86_64 x86_64 x86_64 GNU/Linux

[root@client ~]$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 36G 22G 12G 65% /
tmpfs 1000M 88K 1000M 1% /dev/shm
/dev/sda1 291M 30M 246M 11% /boot

script to find large files:

[root@client ~]$ cat largefile.sh
find / -type f -exec ls -l {} \; > /root/size;
sed -i 's/\s\+/ /g' /root/size;
cut -d' ' -f5,9 /root/size | sort -n | tail -20;


result:


122527744 /var/repo/images/install.img
134217728 /sys/devices/pci0000:00/0000:00:0f.0/resource1
134217728 /sys/devices/pci0000:00/0000:00:0f.0/resource1_wc
149013080 /oracle/database/stage/Components/oracle.ctx/11.2.0.1.0/1/DataFiles/filegroup16.jar
151844017 /u01/app/oracle/product/11.2.0/dbhome_2/jdk/jre/lib/amd64/server/libjvm_g.so
185694208 /var/cache/yum/x86_64/6Server/ol6_UEK_latest/primary.xml.gz.sqlite
200197748 /u01/app/oracle/product/11.2.0/dbhome_2/lib/libserver11.a
209943243 /oracle/database/stage/Components/oracle.owb.rsf/11.2.0.1.0/1/DataFiles/filegroup128.jar
210823812 /u01/app/oracle/product/11.2.0/dbhome_2/bin/oracle
258654208 /oracle/database/stage/Components/oracle.rdbms.install.seeddb/11.2.0.1.0/1/DataFiles/Expanded/filegroup1/Seed_Database.dfb
258654208 /u01/app/oracle/product/11.2.0/dbhome_2/assistants/dbca/templates/Seed_Database.dfb
429422592 /var/cache/yum/x86_64/6Server/test/primary.xml.gz.sqlite
545267712 /u01/app/oracle/oradata/orcl/sysaux01.dbf
713039872 /u01/app/oracle/oradata/orcl/system01.dbf
1111416131 /oracle/linux.x64_11gR2_database_2of2.zip
1111416131 /root/Desktop/linux.x64_11gR2_database_2of2.zip
1239269270 /oracle/linux.x64_11gR2_database_1of2.zip
1239269270 /root/Desktop/linux.x64_11gR2_database_1of2.zip
140737486262272 /proc/kcore


[root@client ~]$ ls -lh /proc/kcore
-r--------. 1 root root 128T Jun 28 10:49 /proc/kcore
 
Old 06-28-2016, 12:26 AM   #2
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,667

Rep: Reputation: 494Reputation: 494Reputation: 494Reputation: 494Reputation: 494
Quote:
when i tried to find large files in harddisk, found 1tb file /proc/kcore from 40gb harddsik. how it is possible ?
Have you compared if you run it native not in virtual?
 
Old 06-28-2016, 12:28 AM   #3
arun natarajan
Member
 
Registered: Jun 2014
Posts: 111

Original Poster
Rep: Reputation: Disabled
am having only virtual setup as of now.
so you mean, is this because of vmware setup ?
 
Old 06-28-2016, 12:34 AM   #4
malekmustaq
Senior Member
 
Registered: Dec 2008
Location: root
Distribution: Slackware & BSD
Posts: 1,667

Rep: Reputation: 494Reputation: 494Reputation: 494Reputation: 494Reputation: 494
Probably.
/proc enumerates processes running and often it describes values relative to the process registered to it which, in the case of virtual system, values can get superimposed.
 
Old 06-28-2016, 01:01 AM   #5
arun natarajan
Member
 
Registered: Jun 2014
Posts: 111

Original Poster
Rep: Reputation: Disabled
ok, let me try same script in production server.
 
Old 06-28-2016, 01:23 AM   #6
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 1,178

Rep: Reputation: 532Reputation: 532Reputation: 532Reputation: 532Reputation: 532Reputation: 532
Code:
df /proc/kcore
shows it is a special file system. It is perhaps presented as a sparse file so a "du" is more exact. But I guess it is used memory (RAM+swap space) anyway, should not count for your task.
Exclude (prune) this file system!
Code:
find / -fstype proc -prune -o -type f -exec ls -l {} + > /root/size;
awk '{print $5,$9}' /root/size | sort -n | tail -20;

Last edited by MadeInGermany; 06-28-2016 at 04:27 AM. Reason: fstype proc (not procfs)
 
1 members found this post helpful.
Old 06-28-2016, 01:56 AM   #7
arun natarajan
Member
 
Registered: Jun 2014
Posts: 111

Original Poster
Rep: Reputation: Disabled
thanks for your commands.
on running above command, still getting the /proc/kcore file


[root@client ~]$ df /proc/kcore
Filesystem 1K-blocks Used Available Use% Mounted on
proc 0 0 0 - /proc
[root@client ~]$ du /proc/kcore
0 /proc/kcore
[root@client ~]$

[root@client ~]$ cat largefile.sh
date;
# find / -type f -exec ls -l {} \; > /root/size;
# sed -i 's/\s\+/ /g' /root/size;
# cut -d' ' -f5,9 /root/size | sort -n | tail -20;

find / -fstype procfs -prune -o -type f -exec ls -l {} + > /root/size;
awk '{print $5,$9}' /root/size | sort -n | tail -20;

date;
[root@client ~]$ sh largefile.sh
Tue Jun 28 12:24:53 IST 2016

118955623 /oracle/database/stage/Components/oracle.jdk/1.5.0.17.0/1/DataFiles/all.jar
122527744 /var/repo/images/install.img
134217728 /sys/devices/pci0000:00/0000:00:0f.0/resource1
134217728 /sys/devices/pci0000:00/0000:00:0f.0/resource1_wc
149013080 /oracle/database/stage/Components/oracle.ctx/11.2.0.1.0/1/DataFiles/filegroup16.jar
151844017 /u01/app/oracle/product/11.2.0/dbhome_2/jdk/jre/lib/amd64/server/libjvm_g.so
185694208 /var/cache/yum/x86_64/6Server/ol6_UEK_latest/primary.xml.gz.sqlite
200197748 /u01/app/oracle/product/11.2.0/dbhome_2/lib/libserver11.a
209943243 /oracle/database/stage/Components/oracle.owb.rsf/11.2.0.1.0/1/DataFiles/filegroup128.jar
210823812 /u01/app/oracle/product/11.2.0/dbhome_2/bin/oracle
258654208 /oracle/database/stage/Components/oracle.rdbms.install.seeddb/11.2.0.1.0/1/DataFiles/Expanded/filegroup1/Seed_Database.dfb
258654208 /u01/app/oracle/product/11.2.0/dbhome_2/assistants/dbca/templates/Seed_Database.dfb
429422592 /var/cache/yum/x86_64/6Server/test/primary.xml.gz.sqlite
545267712 /u01/app/oracle/oradata/orcl/sysaux01.dbf
713039872 /u01/app/oracle/oradata/orcl/system01.dbf
1111416131 /oracle/linux.x64_11gR2_database_2of2.zip
1111416131 /root/Desktop/linux.x64_11gR2_database_2of2.zip
1239269270 /oracle/linux.x64_11gR2_database_1of2.zip
1239269270 /root/Desktop/linux.x64_11gR2_database_1of2.zip
140737486262272 /proc/kcore

Tue Jun 28 12:25:02 IST 2016
[root@client ~]$
 
Old 06-28-2016, 04:29 AM   #8
MadeInGermany
Senior Member
 
Registered: Dec 2011
Location: Simplicity
Posts: 1,178

Rep: Reputation: 532Reputation: 532Reputation: 532Reputation: 532Reputation: 532Reputation: 532
I have edited my post#6, it is "proc" not "procfs" (also the df shows "proc").
 
Old 06-28-2016, 05:42 AM   #9
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Yawnstown, Ohio
Distribution: Mojave
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
I have one too!
Code:
-r-------- 1 root root 128T Jun 28 2016  6:38 AM /proc/kcore
https://www.novell.com/support/kb/doc.php?id=7004153
http://stackoverflow.com/questions/2...e-file-is-huge

Yawn. It's a virtual file. I would not touch it.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Clonezilla caused problem with Seagate 1TB USB Harddisk ruozhe Linux - Hardware 7 08-24-2012 01:08 AM
Sarge 3.1r2 will not create file system on Western Digital 40Gb laptop HDD roofrack Debian 2 08-30-2006 01:44 AM
Low Harddisk space. Can I just transfer the entire Linux to a bigger harddisk? davidas Linux - Newbie 12 04-13-2004 02:03 AM
Harddisk filled-up after removing file chii-chan Linux - Newbie 1 11-12-2003 09:13 PM
How to play a media file/ video file/mp3 file recorded in harddisk/cd-rom arindam Linux - Newbie 2 09-05-2003 10:31 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration