GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
TRUNCATE(2) FreeBSD System Calls Manual TRUNCATE(2)

̾??

truncate, ftruncate???ꤷ??Ĺ???˥ե????????ڤ??ΤƤ?????ĥ?????ꤹ??

Standard C Library (libc, -lc)

<unistd.h> int (const char *path, off_t length) int ftruncate(int fd, off_t length)

truncate() ?????ƥॳ?????ϡ? path ?ǻ??ꤵ?????ե????뤫 fd ?ǻ??Ȥ??????ե??????Υ????????? length ?Х??Ȥˤʤ??褦???ڤ??ΤƤ?????ĥ???ޤ??? ?ե????뤬???Υ??????????礭???????ϡ?;ʬ?ʥǡ????????????ޤ??? ?ե????뤬???Υ????????꾮?????????ϡ?0 ???񤭹??ޤ줿?褦?˳?ĥ?????ޤ??? ftruncate() ?Ǥϡ??ե????뤬???????Ѥ˳????Ƥ???ɬ?פ??????ޤ???

Upon successful completion, the value 0 is returned; otherwise the value -1 is returned and the global variable errno is set to indicate the error.

truncate() ?????ƥॳ?????ϡ??ʲ??Τ褦?ʾ????˽????????Ԥ??ޤ?:

[ENOTDIR]
?ѥ??ι??????????˥ǥ??쥯?ȥ??ʳ??Τ??Τ??ޤޤ??Ƥ??ޤ???
[ENAMETOOLONG]
?ѥ?̾?ι??????Ǥ? 255 ʸ?????ۤ??Ƥ??뤫?? ?ޤ??ϥѥ?̾???Τ? 1023 ʸ?????ۤ??Ƥ??ޤ???
[ENOENT]
???ꤵ?줿?ե????뤬¸?ߤ??ޤ?????
[EACCES]
???֥ѥ?̾?ι??????ǤˤĤ??Ƹ??????Ĥ????ݤ????Ƥ??ޤ???
[EACCES]
???ꤵ?줿?ե??????˥桼?????񤭹????ޤ?????
[ELOOP]
?ѥ?̾???Ѵ??????Ȥ??˸??Ф??줿?????ܥ??å????󥯤?¿?????ޤ???
[EISDIR]
???ꤵ?줿?ե????뤬?ǥ??쥯?ȥ??ˤʤäƤ??ޤ???
[EROFS]
???ꤵ?줿?ե????????ɼ??????ѥե????륷???ƥ????ˤ????ޤ???
[ETXTBSY]
?ե????뤬???¹????Υԥ奢?ץ????????? (??ͭ?ƥ?????) ?ե??????Ǥ???
[EIO]
inode ?ι????򤷤Ƥ????֤??????ϥ??顼??ȯ?????ޤ?????
[EFAULT]
path ?????????ץ??????˳??????Ƥ??줿???ɥ쥹???֤??ϰϳ????ؤ??Ƥ??ޤ???

() ?????ƥॳ?????ϡ??ʲ??Τ褦?ʾ????˽????????Ԥ??ޤ?:

[EBADF]
fd ??????ͭ???ʵ??һҤǤϤ????ޤ?????
[EINVAL]
fd ?????ϥե??????ǤϤʤ??????åȤ򻲾Ȥ??Ƥ??ޤ???
[EINVAL]
fd ?????????????Ѥ˳????Ƥ??ޤ?????

open(2)

???θƽФ??ϡ??ե??????Τ????ϰϤ??????Ǥ????褦?˰??̲????? ɬ?פ??????ޤ???

() ?????Ѥ??ƥե?????????ĥ?????ȡ??ܿ????????????ޤ???

truncate() ?????ƥॳ?????ϡ? 4.2BSD ???о줷?ޤ?????

June 4, 1993 FreeBSD 14.3-RELEASE

Search for    or go to Top of page |  Section 2 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.