09-06-2001
Are you using the "o" flag in the options? If so, that is what is causing the rewind.
Check the man page for more details.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Hi Guys,
I'm writing a shell script that presents the user with various options, they select one (numbered 1-9) and it then excecutes the correct code. No problem, but I'm having slight difficulty with one option.
The user can select to backup all the files in the current directory to another... (2 Replies)
Discussion started by: indigoecho
2 Replies
2. UNIX for Dummies Questions & Answers
Hi,
I'm about to start a regular backup schedule for my Linux system.
I need some pointers if I may :)
The system is *mainly* used as a personal home computer (it's actually a laptop running SuSE 9.2) although I do host some client material from it being a PHP developer.
I know that in... (2 Replies)
Discussion started by: d11wtq
2 Replies
3. UNIX for Dummies Questions & Answers
Can you backup the vtoc, then restore it if you somehow mess it up?
This is solaris 9, x86. (1 Reply)
Discussion started by: BG_JrAdmin
1 Replies
4. Solaris
Hello Mentors,
Before anything else I would like to thanks to all expert here especially Pressy as he guided me to recover our server from disk failure. I posted a lot of question from these forum site concerning on how to recover our server and luckly you guys help me. Our server is now up and... (6 Replies)
Discussion started by: eykyn17
6 Replies
5. AIX
we are running aix on are server. we would like to start doing online backups, but the software company that we use is not beeing much help on what files we are backing up. is there a command that will tell me what files that we are backing up. they offer a service that would back it up for use,... (3 Replies)
Discussion started by: shane.hankins
3 Replies
6. Shell Programming and Scripting
Hi Everyone,
I am new to DBA stuff. I wonder if anyone can help me. Task is that, I have 10 databases and need to take backups of all the databases using data pump in Unix/Linux, compress them using gzip and use cron to schedule the job twice a day.
Appreciate if anyone can help me in... (1 Reply)
Discussion started by: sreepriya0987
1 Replies
7. Shell Programming and Scripting
So I play on a minecraft server that keeps crashing, then rolling back, losing about 30 minutes of data. I don't own the server I'm just writing it for him. So I'm trying to have the script make a back up of the server every 5 minutes as long as it is bigger than the back up, since as more... (2 Replies)
Discussion started by: matt_j_the_king
2 Replies
8. Solaris
Got 5-6 Solaris 10 servers in remote location - power work being done.
At the moment, we just back up the application database that these servers run with the idea that if it all goes wrong we can rebuild and then restore the application.
However, requirement is to provide a complete backup... (3 Replies)
Discussion started by: paulfoel
3 Replies
9. Red Hat
Hi!
I am administering a system I didn't configure. I know it is a RHEL 6.3 VM image and there are others as well. How do I make a backup of the image and of the filesytems, in case I screw up the configuration.
How can I restore it as well.
My plan is this
1) Find out what kind of VM,... (1 Reply)
Discussion started by: md888
1 Replies
10. UNIX for Advanced & Expert Users
Are there any recommended methods for Backing up an entire HD? I want to backup my data. I do not care about the OS file. I just want my work, movies, and music. I have about 600 GB of work, movies, and music so a bit worried about fragmentation if I just copy and paste. (1 Reply)
Discussion started by: cokedude
1 Replies
FSEEK(3) Linux Programmer's Manual FSEEK(3)
NAME
fgetpos, fseek, fsetpos, ftell, rewind - reposition a stream
SYNOPSIS
#include <stdio.h>
int fseek(FILE *stream, long offset, int whence);
long ftell(FILE *stream);
void rewind(FILE *stream);
int fgetpos(FILE *stream, fpos_t *pos);
int fsetpos(FILE *stream, const fpos_t *pos);
DESCRIPTION
The fseek() function sets the file position indicator for the stream pointed to by stream. The new position, measured in bytes, is
obtained by adding offset bytes to the position specified by whence. If whence is set to SEEK_SET, SEEK_CUR, or SEEK_END, the offset is
relative to the start of the file, the current position indicator, or end-of-file, respectively. A successful call to the fseek() function
clears the end-of-file indicator for the stream and undoes any effects of the ungetc(3) function on the same stream.
The ftell() function obtains the current value of the file position indicator for the stream pointed to by stream.
The rewind() function sets the file position indicator for the stream pointed to by stream to the beginning of the file. It is equivalent
to:
(void) fseek(stream, 0L, SEEK_SET)
except that the error indicator for the stream is also cleared (see clearerr(3)).
The fgetpos() and fsetpos() functions are alternate interfaces equivalent to ftell() and fseek() (with whence set to SEEK_SET), setting and
storing the current value of the file offset into or from the object referenced by pos. On some non-UNIX systems, an fpos_t object may be
a complex object and these routines may be the only way to portably reposition a text stream.
RETURN VALUE
The rewind() function returns no value. Upon successful completion, fgetpos(), fseek(), fsetpos() return 0, and ftell() returns the cur-
rent offset. Otherwise, -1 is returned and errno is set to indicate the error.
ERRORS
EBADF The stream specified is not a seekable stream.
EINVAL The whence argument to fseek() was not SEEK_SET, SEEK_END, or SEEK_CUR. Or: the resulting file offset would be negative.
The functions fgetpos(), fseek(), fsetpos(), and ftell() may also fail and set errno for any of the errors specified for the routines
fflush(3), fstat(2), lseek(2), and malloc(3).
ATTRIBUTES
For an explanation of the terms used in this section, see attributes(7).
+----------------------------+---------------+---------+
|Interface | Attribute | Value |
+----------------------------+---------------+---------+
|fseek(), ftell(), rewind(), | Thread safety | MT-Safe |
|fgetpos(), fsetpos() | | |
+----------------------------+---------------+---------+
CONFORMING TO
POSIX.1-2001, POSIX.1-2008, C89, C99.
SEE ALSO
lseek(2), fseeko(3)
COLOPHON
This page is part of release 4.15 of the Linux man-pages project. A description of the project, information about reporting bugs, and the
latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.
GNU 2017-09-15 FSEEK(3)