The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to put file from one ftp to another ftp location prasee Shell Programming and Scripting 1 03-28-2008 01:34 AM
Split file at location of textpattern borgeh UNIX for Advanced & Expert Users 6 09-26-2007 08:26 AM
Untar a TAR file at different location malaymaru UNIX for Dummies Questions & Answers 5 09-18-2006 05:59 PM
What is the file location? Chanakya.m Shell Programming and Scripting 5 07-16-2006 09:42 PM
Location of defaultrouter file in Red Hat 98_1LE UNIX for Dummies Questions & Answers 4 12-11-2001 02:23 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-31-2006
Registered User
 

Join Date: Jul 2006
Posts: 3
Stumble this Post!
Location of file on disk

Is there a system call I can make from C or C++ to get the PHYSICAL location of a file on disk (track number, sector number, size, etc...).
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 08-02-2006
Registered User
 

Join Date: Jan 2004
Posts: 17
Stumble this Post!
Hi,

check man lstat. that gives you the inode-number, block-size but not "real physical location" on the disk. I think that depends on the filesystem and thats allocation table, cluster size and fragmentation.

hth
-fe
Reply With Quote
  #3 (permalink)  
Old 08-02-2006
Registered User
 

Join Date: Jul 2006
Posts: 3
Stumble this Post!
Hey, thanks. Have been poking around the inode possibility but it does look like at that level we are still in the virtual file system, which does not seem to have the physical partition & block information.

Need access to the physical file management system to get that information ...
Reply With Quote
  #4 (permalink)  
Old 08-02-2006
Registered User
 

Join Date: Jul 2006
Posts: 3
Stumble this Post!
I take that back. It turns out inode does have the block info I need. thanks.
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:28 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0