Created
July 16, 2018 05:06
-
-
Save RinatValiullov/ac87f6303cff5c94f0e7e4c60979449f to your computer and use it in GitHub Desktop.
Add file in several directories
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Add file in several directories | |
# find . -type d --> searchs directories in the directory structure | |
# -exec touch {}/hiya \; --> given each result, its value is stored in {}. | |
# So with touch {}/hiya what we do is to touch that "something"/hiya. The final \; is required by exec in find clauses. | |
find . -type d -exec touch {}/sample.txt \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment