LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-22-2011, 02:05 AM   #1
vamsi9042
LQ Newbie
 
Registered: Sep 2011
Location: Bangalore
Distribution: Ubuntu
Posts: 22

Rep: Reputation: Disabled
Exclamation How to find the address location of a file?


Hi friends,

When we store our files in a Hard Disk(external memory), how do we find the memory location of the file in HD.

Thanks in advance.

Last edited by vamsi9042; 09-22-2011 at 02:25 AM.
 
Old 09-22-2011, 12:15 PM   #2
Wayne Sallee
Member
 
Registered: Jun 2011
Location: Florida
Distribution: The one that I built. (lfs)
Posts: 269

Rep: Reputation: 17
Are you trying to hack a hard drive, or trying to write code to open a file?

Wayne Sallee
Wayne@WayneSallee.com
 
Old 09-22-2011, 12:21 PM   #3
Lexus45
Member
 
Registered: Jan 2010
Distribution: Debian, Centos, Ubuntu, Slackware
Posts: 361
Blog Entries: 3

Rep: Reputation: 48
I'm not sure if I understand you in a right way, but what about using commands:

locate
slocate
find /some/path | grep filename

?
 
1 members found this post helpful.
Old 09-22-2011, 01:06 PM   #4
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Rep: Reputation: Disabled
vamsi9042, do you mean path to file? Or size of the file? Make it more clear please.
 
Old 09-22-2011, 01:12 PM   #5
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Here I was thinking he's looking for the logical block(s) the file lives on.

@vamsi9042: It would help if you gave some examples, too.
 
Old 09-22-2011, 01:19 PM   #6
Mr. Alex
Senior Member
 
Registered: May 2010
Distribution: No more Linux. Done with it.
Posts: 1,238

Rep: Reputation: Disabled
Arrow

If the question is about searching inodes, then look here.
If you need to look at file size, then use
Code:
du -h /path/to/file
If you need to find a file with some pattern,
Code:
find /path/where/to/search -iname 'pattern'
 
Old 09-23-2011, 12:12 AM   #7
vamsi9042
LQ Newbie
 
Registered: Sep 2011
Location: Bangalore
Distribution: Ubuntu
Posts: 22

Original Poster
Rep: Reputation: Disabled
Exclamation

Quote:
Originally Posted by Mr. Alex View Post
If the question is about searching inodes, then look here.
If you need to look at file size, then use
Code:
du -h /path/to/file
If you need to find a file with some pattern,
Code:
find /path/where/to/search -iname 'pattern'
I just want to know, How do they store in HD After pressing ctrl+s.
 
Old 09-23-2011, 01:01 PM   #8
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,776

Rep: Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212Reputation: 2212
Is the output from
Code:
hdparm --fibmap /path/to/some/file
the sort of thing you are looking for?
 
2 members found this post helpful.
Old 09-25-2011, 09:19 AM   #9
vamsi9042
LQ Newbie
 
Registered: Sep 2011
Location: Bangalore
Distribution: Ubuntu
Posts: 22

Original Poster
Rep: Reputation: Disabled
Thank you....
 
Old 09-25-2011, 11:36 AM   #10
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
Quote:
Originally Posted by rknichols
Is the output from
Code:
hdparm --fibmap /path/to/some/file
the sort of thing you are looking for?
Nice one! In spite of OP's slightly confusing communication, I learned a great shortcut in this thread.
 
  


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
Does user stack have a fixed address location in its virtual address? lqu Linux - Kernel 1 09-11-2009 01:28 PM
How to find physical location of a file on the HDD? CJS Linux - General 2 01-18-2009 10:14 AM
find the exact location of a running exec file cahdecah General 4 08-16-2007 10:53 AM
parse a file to find an ip address gurucg Programming 14 08-14-2007 01:30 AM
find a specific file's location in a block-bitmap abhishek07 Linux - Kernel 0 06-28-2007 03:20 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:04 PM.

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
Open Source Consulting | Domain Registration