How to check file ownership?

0105

You can check file ownership in Linux using the ls -l command. This command lists files and directories in a detailed format, showing the owner and group associated with each file. Here's how to use it:

ls -l filename

Replace filename with the name of the file or directory you want to check. The output will look something like this:

-rw-r--r-- 1 owner group size date time filename

In this output:

  • owner is the username of the file's owner.
  • group is the group associated with the file.

If you want to check ownership for all files in a directory, simply run:

ls -l

This will display the ownership information for all files and directories in the current directory.

0 Comments

no data
Be the first to share your comment!