LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 08-28-2016, 11:54 PM   #1
j.ski
LQ Newbie
 
Registered: Aug 2016
Posts: 2

Rep: Reputation: Disabled
xfs_io problem with pread


I am using Fedora 23, updated to 4.6.7-200.fc23.x86_64, using:

j.ski@localhost ~> df -T
Filesystem Type 1K-blocks Used Available Use% Mounted on
devtmpfs devtmpfs 2912076 0 2912076 0% /dev
tmpfs tmpfs 2924296 143548 2780748 5% /dev/shm
tmpfs tmpfs 2924296 1692 2922604 1% /run
tmpfs tmpfs 2924296 0 2924296 0% /sys/fs/cgroup
/dev/mapper/fedora-root00 xfs 52403200 13214860 39188340 26% /
tmpfs tmpfs 2924296 80 2924216 1% /tmp
/dev/mapper/fedora-home00 xfs 566007784 10329884 555677900 2% /home
/dev/sda1 xfs 508580 201876 306704 40% /boot
tmpfs tmpfs 584860 20 584840 1% /run/user/42
tmpfs tmpfs 584860 24 584836 1% /run/user/1000

I am trying to use xfs_io to read the contents of a file:

$ xfs_io /home/j.ski/-.truste.com

xfs_io> p
[000] /home/j.ski/-.truste.com (xfs,non-sync,non-direct,read-write)

xfs_io> pread -v 100 /home/j.ski/-.truste.com
pread64: Bad address

When I first tried this I got what I assumed were the files contents. BUT the next time I tried the exact same command, I get:

xfs_io> pread -v 100 /home/j.ski/-.truste.com
pread64: Bad address


Any idea(s)?
 
Old 08-30-2016, 03:26 PM   #2
norobro
Member
 
Registered: Feb 2006
Distribution: Debian Sid
Posts: 792

Rep: Reputation: 331Reputation: 331Reputation: 331Reputation: 331
Code:
xfs_io> help pread
pread [-b bs] [-v] [-i N] [-FBR [-Z N]] off len -- reads a number of bytes at a specified offset

 reads a range of bytes in a specified block size from the given offset
To read 100 bytes from the beginning of the file:
Code:
xfs_io> pread -v 0 100
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
UEFI problem, GRUB2 problem, blank screen problem, :( JackDinn Linux - Newbie 22 05-26-2015 01:57 PM
Do I have a path problem, an Apache2 problem or a Javascript problem or any other pro rblampain Linux - Networking 0 12-29-2010 03:50 AM
sleep time = sys time for pread? wqhhust Linux - Kernel 0 01-20-2009 09:08 PM
Sound Card problem(every time i install linux i have diffirent hardware problem) jacka1l Linux - Newbie 7 08-11-2005 06:10 AM
perl problem? apache problem? cgi problem? WorldBuilder Linux - Software 1 09-17-2003 07:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:27 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