Once we have confirmed all the requirements mentioned in the previous section, we can move on to see how to use extended attributes:
- First, we will create a test file with some dummy data in it:
- Now, we will add an extended attribute to this file using the setfattr command:
- Now, let's determine the attributes on the file, using the getfattr command:
- If we want to check the values of the attributes, we can do that by using the following command:
- At any time, if we want to remove any attribute, we can do the same using the setfattr command, but with the -x option.