Advanced Exercises


13.

How can you create a file named i? Which techniques do not work, and why do they not work? How can you remove the file named i?

14.

Suppose that the working directory contains a single file named andor. What error message do you get when you run the following command line?

$ mv andor and\/or 


Under what circumstances is it possible to run the command without producing an error?

15.

The ls i command displays a filename preceded by the inode number of the file (page 104). Write a command to output inode/filename pairs for the files in the working directory, sorted by inode number. (Hint: Use a pipe.)

16.

Explain the error messages displayed in the following sequence of commands:

$ ls -l total 0 drwxrwxr-x  3 zach  zach  102 Mar  2 17:57 dirtmp $ ls dirtmp $ rmdir dirtmp rmdir: dirtmp: Directory not empty $ rm dirtmp/* rm: dirtmp/*: No such file or directory 


17.

Is it possible to distinguish a file from a hard link to a file? That is, given a filename, can you tell whether it was created using an ln command? Explain.




A Practical Guide to UNIX[r] for Mac OS[r] X Users
A Practical Guide to UNIX for Mac OS X Users
ISBN: 0131863339
EAN: 2147483647
Year: 2005
Pages: 234

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net