list all the files/directories created by a specific user [duplicate]

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite













This question already has an answer here:



  • Find files created by a particular user

    2 answers



Under a folder, there are files created by multiple users. How can I list all the files/directories created by a specific user, using ls or something else?







share|improve this question











marked as duplicate by steeldriver, Jeff Schaller, G-Man, forcefsck, Romeo Ninov Apr 30 at 3:51


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.










  • 2




    You can only show ownership, not creation.
    – Ignacio Vazquez-Abrams
    Apr 29 at 17:29














up vote
0
down vote

favorite













This question already has an answer here:



  • Find files created by a particular user

    2 answers



Under a folder, there are files created by multiple users. How can I list all the files/directories created by a specific user, using ls or something else?







share|improve this question











marked as duplicate by steeldriver, Jeff Schaller, G-Man, forcefsck, Romeo Ninov Apr 30 at 3:51


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.










  • 2




    You can only show ownership, not creation.
    – Ignacio Vazquez-Abrams
    Apr 29 at 17:29












up vote
0
down vote

favorite









up vote
0
down vote

favorite












This question already has an answer here:



  • Find files created by a particular user

    2 answers



Under a folder, there are files created by multiple users. How can I list all the files/directories created by a specific user, using ls or something else?







share|improve this question












This question already has an answer here:



  • Find files created by a particular user

    2 answers



Under a folder, there are files created by multiple users. How can I list all the files/directories created by a specific user, using ls or something else?





This question already has an answer here:



  • Find files created by a particular user

    2 answers









share|improve this question










share|improve this question




share|improve this question









asked Apr 29 at 17:24









user288609

3412412




3412412




marked as duplicate by steeldriver, Jeff Schaller, G-Man, forcefsck, Romeo Ninov Apr 30 at 3:51


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.






marked as duplicate by steeldriver, Jeff Schaller, G-Man, forcefsck, Romeo Ninov Apr 30 at 3:51


This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.









  • 2




    You can only show ownership, not creation.
    – Ignacio Vazquez-Abrams
    Apr 29 at 17:29












  • 2




    You can only show ownership, not creation.
    – Ignacio Vazquez-Abrams
    Apr 29 at 17:29







2




2




You can only show ownership, not creation.
– Ignacio Vazquez-Abrams
Apr 29 at 17:29




You can only show ownership, not creation.
– Ignacio Vazquez-Abrams
Apr 29 at 17:29










2 Answers
2






active

oldest

votes

















up vote
0
down vote













As of now it is not possible with 'ls' command but you don't need to worry 'find' is your friend. Suppose my folder is -> /root/sam and I am looking for file owned by shubham, so following command would do the task-



find /root/sam -user shubham



In case you want specific files, say .php files, then following command can be used-



find /root/sam -user shubham "*.php"






share|improve this answer




























    up vote
    0
    down vote













    As said in the comments, you can only find files that are owned by a certain user. Who created a file is not stored on Unix/Linux systems in general. The following command will give you your file listing.



    find /path/to/directory -user USERNAME


    So to find all files from user pete in the home directory of user john use the following command



    find /home/john -user pete


    You need to have the right permissions to search /home/john. When you are not logged in as root the command should be preceded by 'sudo'



    sudo find /home/john -user pete





    share|improve this answer




























      2 Answers
      2






      active

      oldest

      votes








      2 Answers
      2






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes








      up vote
      0
      down vote













      As of now it is not possible with 'ls' command but you don't need to worry 'find' is your friend. Suppose my folder is -> /root/sam and I am looking for file owned by shubham, so following command would do the task-



      find /root/sam -user shubham



      In case you want specific files, say .php files, then following command can be used-



      find /root/sam -user shubham "*.php"






      share|improve this answer

























        up vote
        0
        down vote













        As of now it is not possible with 'ls' command but you don't need to worry 'find' is your friend. Suppose my folder is -> /root/sam and I am looking for file owned by shubham, so following command would do the task-



        find /root/sam -user shubham



        In case you want specific files, say .php files, then following command can be used-



        find /root/sam -user shubham "*.php"






        share|improve this answer























          up vote
          0
          down vote










          up vote
          0
          down vote









          As of now it is not possible with 'ls' command but you don't need to worry 'find' is your friend. Suppose my folder is -> /root/sam and I am looking for file owned by shubham, so following command would do the task-



          find /root/sam -user shubham



          In case you want specific files, say .php files, then following command can be used-



          find /root/sam -user shubham "*.php"






          share|improve this answer













          As of now it is not possible with 'ls' command but you don't need to worry 'find' is your friend. Suppose my folder is -> /root/sam and I am looking for file owned by shubham, so following command would do the task-



          find /root/sam -user shubham



          In case you want specific files, say .php files, then following command can be used-



          find /root/sam -user shubham "*.php"







          share|improve this answer













          share|improve this answer



          share|improve this answer











          answered Apr 29 at 17:48









          Shubham Pandey

          11




          11






















              up vote
              0
              down vote













              As said in the comments, you can only find files that are owned by a certain user. Who created a file is not stored on Unix/Linux systems in general. The following command will give you your file listing.



              find /path/to/directory -user USERNAME


              So to find all files from user pete in the home directory of user john use the following command



              find /home/john -user pete


              You need to have the right permissions to search /home/john. When you are not logged in as root the command should be preceded by 'sudo'



              sudo find /home/john -user pete





              share|improve this answer

























                up vote
                0
                down vote













                As said in the comments, you can only find files that are owned by a certain user. Who created a file is not stored on Unix/Linux systems in general. The following command will give you your file listing.



                find /path/to/directory -user USERNAME


                So to find all files from user pete in the home directory of user john use the following command



                find /home/john -user pete


                You need to have the right permissions to search /home/john. When you are not logged in as root the command should be preceded by 'sudo'



                sudo find /home/john -user pete





                share|improve this answer























                  up vote
                  0
                  down vote










                  up vote
                  0
                  down vote









                  As said in the comments, you can only find files that are owned by a certain user. Who created a file is not stored on Unix/Linux systems in general. The following command will give you your file listing.



                  find /path/to/directory -user USERNAME


                  So to find all files from user pete in the home directory of user john use the following command



                  find /home/john -user pete


                  You need to have the right permissions to search /home/john. When you are not logged in as root the command should be preceded by 'sudo'



                  sudo find /home/john -user pete





                  share|improve this answer













                  As said in the comments, you can only find files that are owned by a certain user. Who created a file is not stored on Unix/Linux systems in general. The following command will give you your file listing.



                  find /path/to/directory -user USERNAME


                  So to find all files from user pete in the home directory of user john use the following command



                  find /home/john -user pete


                  You need to have the right permissions to search /home/john. When you are not logged in as root the command should be preceded by 'sudo'



                  sudo find /home/john -user pete






                  share|improve this answer













                  share|improve this answer



                  share|improve this answer











                  answered Apr 29 at 17:56









                  Aad Schippers

                  32




                  32












                      Popular posts from this blog

                      Peggy Mitchell

                      Palaiologos

                      The Forum (Inglewood, California)