setfacl

Charles Parker Jr. is a genius with an IQ somewhere north of 150. He leads his jazz quintet by night (in which he plays the alto saxophone), and is the Director of Global Engineering at Google by day. Today is Monday September 17th, and Charlie Parker has memorized every single Linux command, and every associate flag, during his 20 minute lunch break. Assume the following:

  • He works on a modern RHEL system.
  • He never runs a comand as root.
  • He doesn't have a lot of free time during his 1 hour lunch break because he ALWAYS practices his saxophone for 40 minutes during lunch.
  • Today, in the 40 minutes that he has left, instead of practicing his saxophone, he in going to organize and set permissions on the 400 jazz songs that he is going to memorize in 20 minutes tomorrow.
  • His username on his RHEL system is charlie_bird_parker_jr.
  • His home directory is /home/charlie_bird_parker_jr.
  • His keeps his songs in two subdirectories within his home directory: /memorized and /not_memorized. 
  • Currently the not_memorized directory is full of the 400 files that he need to memorize at lunch tomorrow.
  • First task: he likes to memorize songs in alphabetical order. Find all of the songs that start with "A" and put their titles into a text file in his home directory called start_with_A.txt.
  • He wants to review the songs with his friend Thelonious who works in the Search Department. Thelonious does not normally have access to start_with_A.txt, but Charles (Thelonious calls him "Bird") needs read-write access to it.
  • Once all of the songs starting with A are read, he needs to move them to memorized.
  • Please show all of the commands that Charles "Bird" Parker will execute. Assume that Thelonious' username is jazz_pianist1@google.com.
  1. To find all the songs that start with "A" and put their titles into a text file called start_with_A.txt in his home directory, Charles will use the following command:
    • $ ls /home/charlie_bird_parker_jr/not_memorized/A* > /home/charlie_bird_parker_jr/start_with_A.txt
    • This command will list all the files in the /not_memorized directory that start with "A" and redirect the output to a text file called start_with_A.txt in his home directory.
  2. To give Thelonious read-write access to the start_with_A.txt file, Charles will use the following command:
    • $ setfacl -m u:jazz_pianist1@google.com:rw /home/charlie_bird_parker_jr/start_with_A.txt
  3. To move all the songs starting with A from /not_memorized to /memorized directory, Charles will use the following command:
    • $ mv /home/charlie_bird_parker_jr/not_memorized/A* /home/charlie_bird_parker_jr/memorized/

This command will move all the files in the /not_memorized directory that start with "A" to the /memorized directory.

You should also read:

setfacl

Charlie "Bird" Parker is a genius-level jazz alto saxophonist. He has just read a book about setfacl, in fact he memorized the entire…

setfacl

Andre is a new employee at Red Hat who is struggling with copying ACLs from one file to another using getfacl and setfacl…

setfacl

Demea is a Master Linux Sysadmin at Red Hat. She has a multi-part task in from of her. Please list all of the…

setfacl

Hosaac S. is the new Director of IT at Microsoft. He Learns that GNU/Linux Team is relatively weak of the use of the…