FLOPPIX Home | FAQ | Download | Labs | ToC | Back |  Next 

File Commands


Some file commands:


  1. Load Floppix and login on virtual console 1 using your own initials.
  2. Get a listing of the files in your own home directory.
  3. What hidden files (filename begins with . ) are present in your own home directory?
  4. What hidden files are present in the directory /home/alterego?
  5. Use head or tail to do the following:
  6. Practice the copy command:
  7. In your own home directory, use the touch command to create five files: one, two, three, four and five. Get a directory listing to make sure that the command worked.
  8. Practice making directories.
  9. Practice moving files from your own home directory:
  10. Use the move command to rename files.

Questions & Answers:

  1. What is a "pager"?
    Answer: A pager displays the contents of a file one screen or page at a time. "more" and "less" are both pagers.
  2. What command will display the last 5 lines of the file /etc/passwd?
    Answer: tail   -5   /etc/passwd
  3. What command will copy the file /etc/passwd to your own home directory?
    Answer: cp   /etc/passwd   ~
  4. What command will copy all files that start with h from the /etc directory to your own home directory?
    Answer: cp   /etc/h*   ~
  5. What command will create 3 files: r1, r2 and r3?
    Answer: touch   r1   r2   r3
  6. What command will copy r1 and r2 to the /tmp directory?
    Answer: cp   r[12]   /tmp
  7. What command will delete the files r1, r2 and r3 but not readme?
    Answer: rm   r?

Copyright © L. M. MacEwan
FLOPPIX Home | FAQ | Download | Labs | ToC | Back |  Next