1. Home
  2. Docs
  3. Beginning UNIX on Raven
  4. Final knowledge check

Final knowledge check

  1. How would you change your password?
  2. What does the command cd ~ do?
  3. How can you change from /home/pi/files to /home/pi/newfiles using a relative path?
  4. What command will list all text files (.txt) in a directory showing their file sizes in an easily readable form?
  5. What command will show you the first 10 lines of a file?
  6. What about the first 25 lines?
  7. How about the last 12?
  8. How can you find out how to use a new command?
  9. What command file will rename file1.txt to file2.txt?
  10. How can you move /home/pi/files/file1/txt to the /home/pi directory ?
  11. How can you delete all text (.txt) files in a directory?
  12. How about deleting all files that have the same format (file1.txt, files2.txt etc)?
  13. How can you list all the lines in a file which contain the word raspberry or Raspberry?
  14. How can you count the number of lines in a file that contain the word pi?
  15. What command will append the output from a program called analyse to a file called output.txt?
  16. How can you create a new directory called newdir?
  17. How can you count the number of files in your home directory with a .txt suffix?
  18. How can you scroll though your output.txt file?
  19. How can you find out what all the files in your directory may contain?
  20. How can you redirect the output from a program called analysis to both a file called output.txt and also show it on screen?