Sponsored Content
Full Discussion: System calls for cp and mv
Top Forums UNIX for Dummies Questions & Answers System calls for cp and mv Post 70018 by blowtorch on Monday 25th of April 2005 10:04:12 AM
Old 04-25-2005
Just a small correction. mv across filesystems will use read syscall to read the source file, write to write to the destination file and probably unlink to remove the file from the source directory. inode numbers may change in moves across filesystems.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

System Calls

What does the system call "dup" do? What is the difference between dup and dup2 I have a fair idea of what it does but I am confused when its coming down to the exact details... Please help me!:confused: (2 Replies)
Discussion started by: clickonline1
2 Replies

2. UNIX for Dummies Questions & Answers

System calls?

open, creat, read, write, lseek and close Are they all primitive? :confused: *Another Question: is there a different between a system call, and an i/o system call? (2 Replies)
Discussion started by: PlunderBunny
2 Replies

3. Solaris

System calls ?

where can i find the differences in System calls between solaris and aix? also is it possible to find a comprehensive list of them? (1 Reply)
Discussion started by: TECHRAMESH
1 Replies

4. UNIX Desktop Questions & Answers

Using system calls

Hi, I'm new to UNIX system calls. Can someone share your knowledge as to how exactly system calls should be executed? Can they be typed like commands such as mkdir on the terminal itself? Also, are there any websites which will show me an example of the output to expect when a system call like... (1 Reply)
Discussion started by: ilavenil
1 Replies

5. Programming

System calls

why user is not able to switch from user to kernel mode by writing the function whose code is identical to system call. (1 Reply)
Discussion started by: joshighanshyam
1 Replies

6. BSD

system calls

what is the functions and relationship between fork,exec,wait system calls as i am a beginer just want the fundamentals. (1 Reply)
Discussion started by: sangramdas
1 Replies

7. UNIX for Dummies Questions & Answers

About system calls.

Hi all, I am new here . I want to know about system call in detail. As system calls are also function .How system identifies it.:) (2 Replies)
Discussion started by: vishwasrao
2 Replies

8. UNIX for Dummies Questions & Answers

system calls in C

Hello, how would i be able to call ps in C programming? thanks, ---------- Post updated at 01:39 AM ---------- Previous update was at 01:31 AM ---------- here's the complete system call, ps -o pid -p %d, getpit() (2 Replies)
Discussion started by: l flipboi l
2 Replies

9. UNIX for Dummies Questions & Answers

System calls in UNIX

Hi i am very new to programming in UNIX and don't understand the difference between a system call and a normal function call. Also can I implement system calls from within a program? If so could someone please give me an example of a system call from within a program. Lastly, when creating a... (1 Reply)
Discussion started by: bjhum33
1 Replies

10. Programming

Are system calls in c language only????

Hi friends, I have three questions. 1) What are system calls? 2) Is it necessary that system calls be in c language (in unix operating system)? 3) Importance of c language when programming in unix environment??? Looking forward to your wonderful replies! ... (2 Replies)
Discussion started by: gabam
2 Replies
xfs_copy(8)						      System Manager's Manual						       xfs_copy(8)

NAME
xfs_copy - copy the contents of an XFS filesystem SYNOPSIS
xfs_copy [ -bd ] [ -L log ] source target1 [ target2 ... ] DESCRIPTION
xfs_copy copies an XFS filesystem to one or more targets in parallel (see xfs(5)). The first (source) argument must be the pathname of the device or file containing the XFS filesystem. The remaining arguments specify one or more target devices or file names. If the pathnames specify devices, a copy of the source XFS filesystem is created on each device. The target can also be the name of a regular file, in which case an image of the source XFS filesystem is created in that file. If the file does not exist, xfs_copy creates the file. The length of the resulting file is equal to the size of the source filesystem. However, if the file is created on an XFS filesystem, the file consumes roughly the amount of space actually used in the source filesystem by the filesystem and the XFS log. The space saving is because xfs_copy seeks over free blocks instead of copying them and the XFS filesystem supports sparse files efficiently. xfs_copy should only be used to copy unmounted filesystems, read-only mounted filesystems, or frozen filesystems (see xfs_freeze(8)). Oth- erwise, the generated filesystem(s) would be inconsistent or corrupt. xfs_copy does not alter the source filesystem in any way. Each new (target) filesystem is identical to the original filesystem except that new filesystems each have a new unique filesystem identifier (UUID). Therefore, if both the old and new filesystems will be used as sepa- rate distinct filesystems, xfs_copy or xfsdump(8)/xfsrestore(8) should be used to generate the new filesystem(s) instead of dd(1) or other programs that do block-by-block disk copying. xfs_copy uses synchronous writes to ensure that write errors are detected. xfs_copy uses pthreads(7) to perform simultaneous parallel writes. xfs_copy creates one additional thread for each target to be written. All threads die if xfs_copy terminates or aborts. OPTIONS
-d Create a duplicate (true clone) filesystem. This should be done only if the new filesystem will be used as a replacement for the original filesystem (such as in the case of disk replacement). -b The buffered option can be used to ensure direct IO is not attempted to any of the target files. This is useful when the filesystem holding the target file does not support direct IO. -L log Specifies the location of the log if the default location of /var/tmp/xfs_copy.log.XXXXXX is not desired. DIAGNOSTICS
xfs_copy reports errors to both stderr and in more detailed form to a generated log file whose name is of the form /var/tmp/xfs_copy.log.XXXXXX or a log file specified by the -L option. If xfs_copy detects a write error on a target, the copy of that one target is aborted and an error message is issued to both stderr and the log file, but the rest of the copies continue. When xfs_copy termi- nates, all aborted targets are reported to both stderr and the log file. If all targets abort or if there is an error reading the source filesystem, xfs_copy immediately aborts. xfs_copy returns an exit code of 0 if all targets are successfully copied and an exit code of 1 if any target fails. NOTES
When moving filesystems from one disk to another, if the original filesystem is significantly smaller than the new filesystem, and will be made larger, we recommend that mkfs.xfs(8) and xfsdump(8)/xfsrestore(8) be used instead of using xfs_copy and xfs_growfs(8). The filesys- tem layout resulting from using xfs_copy/xfs_growfs is almost always worse than the result of using mkfs.xfs/xfsdump/xfsrestore but in the case of small filesystems, the differences can have a significant performance impact. This is due to the way xfs_growfs(8) works, and not due to any shortcoming in xfs_copy itself. CAVEATS
xfs_copy does not copy XFS filesystems that have a real-time section or XFS filesystems with external logs. In both cases, xfs_copy aborts with an error message. SEE ALSO
mkfs.xfs(8), xfsdump(8), xfsrestore(8), xfs_freeze(8), xfs_growfs(8), xfs(5). xfs_copy(8)
All times are GMT -4. The time now is 02:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy