Title: Quiz 4 - Files and Directories
Course: CIS 121: Linux/UNIX I: Fundamentals ~ For IGNITE Review

Q: List the names of the non-hidden files in your current directory and their inode numbers.
A: ls -i / ls -li / ls -il / ls -i ./ / ls -l -i / ls -i -l
If wrong: The command to list the names of the non-hidden files in your directory and their inode numbers: ls -i

Q: List all files in your current directory with names beginning with "tigers".
A: ls tigers* / ls -d tigers* / ls -l tigers* / ls -ld tigers* / ls ./tigers*
If wrong: A command to list all files in your current directory with names beginning with "tigers" is: ls tigers*

Q: List all non-hidden files in your current directory that end in a digit.
A: ls *[0-9] / ls -d *[0-9} / ls -l *[0-9] / ls -l *[1234567890] / ls *[1234567890] / ls ./*[0-9] / ls *[0123456789] / ls -ld *[0-9]
If wrong: A command to list all non-hidden files in your current directory that end in a digit is: ls *[0-9]

Q: Create a hard link to a file called "file1".  The file is in a sub-directory of your current directory.  That directory is called "dir22".  Place the link in your current directory.  Call the link "mylink".
A: ln dir22/file1 mylink / ln dir22/file1 "mylink"
If wrong: A command to display the lines of the file"listme" that contain the pattern "xyzzy" is: grep "xyzzy" listme

Q: List all files in your subdirectory "dir1" that start with a vowel.
A: ls dir1/[aeiouAEIOU]* / ls dir1/[aAeEiIoOuU]* / ls -l dir1/[aAeEiIoOuU]*
If wrong: A command to list all files in your subdirectory "dir1" that start with a vowel is: ls dir1/[aeiouAEIOU]*

Q: Move all files that end with 2010 to an exisitng sub-directory called "old". "old" is an exisitng sub-directory of your current directory.
A: mv *2010 old / mv *2010 old/ / mv *2010 ./old / mv ./*2010 old / mv *2010 ./old/
If wrong: A command to move all files that end with 2010 to an exisitng sub-directory called "old". "old" is an exisitng sub-directory of your current directory is: mv *2010 old

Q: Who was the primary person responsible for the development of the Linux operating system?
A: Linus Torvalds / Linus B. Torvalds
If wrong: Linus Torvalds was the primary person responsible for the development of the Linux operating system.

Q: What command can I use to make the parent directory of my current directory my new current directory?
A: cd .. / cd ../
If wrong: A command that can be used to make the parent directory of my current directory my new current directory is: cd ..

Q: Move the file called "my_data" to a directory "all_data" which is a sub-directory of your current directory.  Keep the name the same.
A: mv my_data all_data / mv my_data all_data/my_data
If wrong: A command to move the file called "my_data" to a directory "all_data" which is a sub-directory of your current directory while keeping the name the same is: mv my_data all_data

Q: Create a soft link in your current directory to your file"frodo" which is also in your current directory.  Call the new link "good_hobbit".
A: ln -s frodo good_hobbit / ln -s ./frodo ./good_hobbit
If wrong: To create a hard link, called "good_hobbit", in your current directory to your file"frodo" which is also in your current directory, the following can be used: ln frodo good_hobbit

Q: Extra Credit:  Write a command to list all HIDDEN files that end in "conf"
A: ls .*conf / ls -l .*conf
If wrong: A command to list all HIDDEN files that end in "conf" is: ls .*conf