Reputation
Top tag
Next privilege 125 Rep.
Vote down
Badges
4
Newest
 Scholar
Impact
~711 people reached

  • 0 posts edited
  • 0 helpful flags
  • 7 votes cast
Jul
27
comment Apply recursive chmod to files or folders only
Logged in to upvote this answer, but also add a potentially useful extra: +X is only additive, so you can explicitly remove the execute bit on files at the same time as setting it on folders: chmod -R u-x+X,go-rwx <target> will give you 600/700 on all files/folders from <target> downwards.
May
1
answered Shell Script: To extract a part of string from a file after a match is found
Mar
14
comment Use grep to find all files in a directory with two strings
How's this for inefficient, then?: find . -type f -exec sh -c 'grep -q "foo" "$1" && grep -q "bar" "$1" && echo "$1"' _ {} \;
Sep
19
comment List of top level folders with contents no younger than 30 days
I'm in awe. I had no idea zsh was capable of such gymnastics, and comm is my new favourite tool.
Sep
18
comment List of top level folders with contents no younger than 30 days
I like this. It gets around having to cross-reference two lists and also having to for through lists of directory strings. It's clear now I went wrong by trying to generate the list first, rather than simply iterating through the top-level folders. Thanks!
Sep
18
awarded  Scholar
Sep
18
accepted List of top level folders with contents no younger than 30 days
Sep
18
awarded  Student
Sep
18
asked List of top level folders with contents no younger than 30 days
Mar
22
awarded  Supporter
Jul
10
awarded  Autobiographer