Find the answer to your Linux question:
Results 1 to 10 of 10
Hey lads, I'm having an unreasonably hard time looking for a command that will go through a directory and give you all files with permission 777 to output (ls -1 ...
  1. #1
    Just Joined!
    Join Date
    Sep 2009
    Posts
    9

    quick bash help for newbie

    Hey lads,

    I'm having an unreasonably hard time looking for a command that will go through a directory and give you all files with permission 777 to output (ls -1 output).

    find /$dir -type ???

    thank you very much for your time!

  2. #2
    Linux Engineer Thrillhouse's Avatar
    Join Date
    Jun 2006
    Location
    Arlington, VA, USA
    Posts
    1,377
    Code:
    find /dir/to/search -perm 777

  3. #3
    Just Joined!
    Join Date
    Sep 2009
    Posts
    9
    thanks a mill, thrillhouse! I added -type f -ls after it to restrict to files, which worked out well.

  4. #4
    Just Joined!
    Join Date
    Sep 2009
    Posts
    9
    hey, sorry to ask again,

    quick help for script that will detect duplicates in a folder?

    this command here provides errors:

    find /dir -type f -print0 | xargs -0 -n1 md5sum | sort --key=1,32 | uniq -w 32 -d --all-repeated=separate

    which is supposed to detect/display duplicate files by content via md5 sum

  5. #5
    Linux Engineer Thrillhouse's Avatar
    Join Date
    Jun 2006
    Location
    Arlington, VA, USA
    Posts
    1,377
    What's the error? Offhand, "-print0" looks fishy.

  6. #6
    Just Joined!
    Join Date
    Sep 2009
    Posts
    9
    sorry for taking a while...
    the error is xarg -0 or something

    eh, I hope I'm not being too bothersome by asking how you would go about doing that yourself? easy to understand method?

    thanks

  7. #7
    Just Joined!
    Join Date
    Sep 2009
    Posts
    9
    eh, n/m I tweaked it to work!

  8. #8
    Just Joined!
    Join Date
    Sep 2009
    Posts
    9
    very basic question here,
    the find command along with -ls outputs in a way different than if you were to do a command for ls -l file

    how can you make it output that way? sorry to bombard this thread here, just limited time i have now

  9. #9
    Linux Newbie
    Join Date
    Mar 2009
    Posts
    228
    Code:
    find /dir -exec ls -l {} \;

  10. #10
    Just Joined!
    Join Date
    Sep 2009
    Posts
    9
    you are both life savers, thank you!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...