4259 links
  • Arnaud's links
  • Home
  • RSS Feed
  • Tag cloud
  • Login
search: tag:find — newest first
  • Note: find exec grep print filename only match

    find . -name foo.yml -exec bash -c "grep -q office {} && echo {} && grep office {}" \;

    August 16, 2022 - permalink - https://links.infomee.fr/shaare/c7kuZw
    find grep
  • Unix/Linux find and sort by date modified - Super User

    find . -printf "%T@ %Tc %p\n" | sort -n

    printf arguments from man find:

    %Tk: File's last modification time in the format specified by k.
    
    @: seconds since Jan. 1, 1970, 00:00 GMT, with fractional part.
    
    c: locale's date and time (Sat Nov 04 12:02:33 EST 1989).
    
    %p: File's name.
    
    May 15, 2018 - permalink - https://superuser.com/questions/294161/unix-linux-find-and-sort-by-date-modified
    find order
  • Note: find world readable files

    find . -perm -o+r

    And the opposite :

    find . ! -perm -o+r

    June 8, 2017 - permalink - https://links.infomee.fr/shaare/fmn6vw
    find
  • Note: find/sed equivalent in python

    for root, dirs, files in os.walk("folder"):
    for file in files:
    if file.endswith(".yml"):
    print(os.path.join(root, file))
    with open(os.path.join(root, file), "r") as sources:
    lines = sources.readlines()
    with open(os.path.join(root, file), "w") as sources:
    for line in lines:
    sources.write(re.sub(r'pattern', 'foo', line))

    May 29, 2017 - permalink - https://links.infomee.fr/shaare/Y803hg
    find python sed
  • linux - Looking for files NOT owned by someone - Stack Overflow

    find . ! -user foo -print

    December 9, 2016 - permalink - http://stackoverflow.com/questions/5927489/looking-for-files-not-owned-by-someone
    find
  • ack, une alternative à grep pour codeurs

    ack permet de rechercher dans une arbo plus facilement (moins verbeusement) qu'avec grep et find.
    Orienté developpeur car il ignore tous les fichiers/dossiers des gestionnaires de versions (svn, git, vcs, mercurial..)

    August 2, 2013 - permalink - http://fr.nicosphere.net/ack-une-alternative-a-grep-pour-codeurs-2380/
    ack alternative find grep
  • Welcome to The UNIX Grymoire!
    January 29, 2012 - permalink - http://www.grymoire.com/Unix/
    find linux man reference sed unix