The rename(2) system call usually only works within a single ?le system. However,the mv(1) command can be used to rename a ?le between two different ?le systems. How do you think the command knows that the source and destination aredifferent ?le systems? How do you think the mv command renames a ?le between two different ?le systems

What will be an ideal response?

he command could use stat(2) and comparethe st_dev entries to see if the source and destination ?le systems are on the same device. However, the command simply calls rename(2), and if it fails with errno set to EXDEV, then the command knows the two ?le systems aredifferent. In this case, the command simply copies the ?le from the source to the destination and then removes the source copy

Computer Science & Information Technology

You might also like to view...

Which is NOT one of the three main e-commerce categories?

A) C2C B) C2B C) B2C D) B2B

Computer Science & Information Technology

You can open the Caption Properties dialog box by right-clicking the caption row, as shown in the accompanying figure, and then clicking the Caption Properties command on the shortcut menu.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology