Sponsored Content
Top Forums Programming Difference between cp and mv linux command Post 302424990 by dharshini123 on Thursday 27th of May 2010 12:33:06 AM
Old 05-27-2010
thanks for your replay. I know this. Actually I want to know file system data structure difference between cp and mv command. Because if copy the tmp file to original file then fsync() icotl()(seen in my source code) then power off machine there is no data loss. If i move the tmp file to original then there is a data loss. So i want to know what makes the difference between these.

Thanks,
Indira.
 

9 More Discussions You Might Find Interesting

1. Programming

Difference in LINUX and SOLARIS

/* * one-way-pipe.c - example of using a pipe to communicate data between a * process and its child process. The parent reads input * from the user, and sends it to the child via a pipe. * The child prints the received data to the... (1 Reply)
Discussion started by: SQ4LIFE
1 Replies

2. UNIX for Dummies Questions & Answers

Difference between UNIX and Linux

OK, I've used various versions of UNIX(Solaris, HPUX, etc..) over the years. Now the organization I work for is leaning towards more Linux based systems(Redhat, Suse, etc..) I do see differences in in comands and how to accomplish basic adminstration, but nothing mind blowing. So, what is it... (5 Replies)
Discussion started by: pbonilla
5 Replies

3. UNIX for Dummies Questions & Answers

su command difference between unix and linux

Hello all the su with -l option is running normal with linux but when i try to run it on unix AIX 5.2.7 it's not working with -l option any help (6 Replies)
Discussion started by: islam.said
6 Replies

4. UNIX for Dummies Questions & Answers

difference between unix and linux

Hi I am new to linux I have dout waht is the difference between UNIX and LINUX Is there any soft for insatallation for UNIX OS Thanks (0 Replies)
Discussion started by: sanjaya
0 Replies

5. Linux

Difference between Windows and Linux

Hi, What is the difference between Linux and Windows? Thanks. (1 Reply)
Discussion started by: billcrosby
1 Replies

6. Linux

What is the difference between Linux and Windows?

Hi, What is the difference between Linux and Windows? Thanks. (5 Replies)
Discussion started by: billcrosby
5 Replies

7. UNIX for Dummies Questions & Answers

Difference between UNIX and Linux

hi experts please tell me the real difference between unix and linux at kernel structure (1 Reply)
Discussion started by: linurag
1 Replies

8. Red Hat

Difference Redhat Linux/RH Enterprise Linux

what is the difference between Redhat Linux and Redhat Enterprise Linux. whereas Redhat linux have Server installation options too. (2 Replies)
Discussion started by: hananabbas
2 Replies

9. UNIX for Dummies Questions & Answers

AIX to Linux command difference

Moving from AIX 6.1 to RHEL 6.6, I have noticed a few command differences. One that has been causing issue is a simple echo command when I have to use it this way -> "echo -e" On the AIX it outputs to "-e" but since RHEL has "-e" as an option for echo and hence it outputs to blank here. All... (3 Replies)
Discussion started by: aster007
3 Replies
Sync(3pm)						User Contributed Perl Documentation						 Sync(3pm)

NAME
File::Sync - Perl access to fsync() and sync() function calls SYNOPSIS
use File::Sync qw(fsync sync); sync(); fsync(*FILEHANDLE) or die "fsync: $!"; # and if fdatasync() is available on your system: fdatasync($fh) or die "fdatasync: $!"; use File::Sync qw(fsync); use FileHandle; $fh = new FileHandle("> /tmp/foo") or die "new FileHandle: $!"; ... $fh->fsync() or die "fsync: $!"; DESCRIPTION
The fsync() function takes a Perl file handle as its only argument, and passes its fileno() to the C function fsync(). It returns undef on failure, or true on success. fdatasync() is identical in return value, but it calls C fdatasync() instead of fsync(), synchronizing only the data in the file, not the metadata. The fsync_fd() function is used internally by fsync(); it takes a file descriptor as its only argument. The sync() function is identical to the C function sync(). This module does not export any methods by default, but fsync() is made available as a method of the FileHandle class. Note carefully that as of 0.11, we no longer clobber anything in IO::Handle. You can replace any calls to IO::Handle::fsync() with IO::Handle::sync(): https://rt.cpan.org/Public/Bug/Display.html?id=50418 NOTES
Doing fsync() if the stdio buffers aren't flushed (with $| or the autoflush method) is probably pointless. Calling sync() too often on a multi-user system is slightly antisocial. AUTHOR
Carey Evans <c.evans@clear.net.nz> SEE ALSO
perl(1), fsync(2), sync(2), perlvar(1) perl v5.14.2 2011-11-19 Sync(3pm)
All times are GMT -4. The time now is 08:01 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy