adplus-dvertising
frame-decoration

Question

truncate needs the ___ of the file as an argument but ftruncate works with _______

a.

pathname, file descriptor

b.

file descriptor, pathname

c.

pathname, pathname

d.

file descriptor, file descriptor

Posted under UNIX

Answer: (a).pathname, file descriptor

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. truncate needs the ___ of the file as an argument but ftruncate works with _______

Similar Questions

Discover Related MCQs

Q. Which of the following system call is used for truncating a file?

Q. Which of the following offset is used with lseek system call to set the offset pointer to the end of the file?

Q. ____ system call is used for positioning the offset pointer.

Q. write system call returns -1 when ___________

Q. ____ system call is used for writing to a file.

Q. close system call returns ____

Q. Which of the following system call is used for closing a file?

Q. open system call returns the file descriptor as ___

Q. Which of the following mode is used for opening a file in both reading and writing?

Q. There are ___ modes of opening a file.

Q. Which of the following system call is used for opening or creating a file?

Q. For reading input, which of the following system call is used?

Q. The chmod command invokes the ____ system call.

Q. All UNIX and LINUX systems have one thing in common which is ____

Q. In ____ mode, the kernel runs on behalf of the user.

Q. When we execute a C program, CPU runs in ____ mode.

Q. A system call is a routine built into the kernel and performs a basic function.

Q. For displaying the archive, -t option is used with the tar command.

Q. du command can also be used for reporting the disk space consumed by each user.

Q. Which option is used with du command for finding only the summary of disk usage by a specific directory?