Skip to content

Instantly share code, notes, and snippets.

@obiknows
Created January 23, 2017 22:23
Show Gist options
  • Save obiknows/9ef0f0829e70418dceabe9daa67aafe3 to your computer and use it in GitHub Desktop.
Save obiknows/9ef0f0829e70418dceabe9daa67aafe3 to your computer and use it in GitHub Desktop.
HW1 Prelab
  1. What will happne if you type man man in Linux?
  2. How can you use the command ls to find out about the size of file /etc/lilo.conf
  3. What happens if you have two files with names file1 and file2 and you type mv file1 file2? Which option of mv issues a warning?
  4. What is the command that you issue if you are in directory / and want to copy the file /mydata to directory /labdata
  5. What is the command that you issue if your are in directory / and want to copy all files and directories under directory /mydirectory to directory /newdirectory?
  6. What happens if you type the command rm * in a directory?
  7. What is the command that you issue if you want to delete all files and directories under the directory /mydirectory
@obiknows
Copy link
Author

  1. man man in Linux gives back the man pages for using the program man.
  2. you could write ls -l /etc or
    ls -l /etc/ | grep lilo.conf
  3. The contents of file1 overwrite the contents of file 2. ( in essence a blind delete of file 2 ). mv -i issues a warning.
  4. you could write cp -r /mydata /labdata
  5. you could write cp -avr mydirectory/* newdirectory
  6. If you type rm * in a directory, it will delete everything in the directory
  7. you could type rm /mydirectory/*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment