Last active
November 2, 2021 03:47
-
-
Save kairusds/73eb6150987601f7977e26cb072bbd76 to your computer and use it in GitHub Desktop.
Creates empty files/clone files from an ls output. https://unix.stackexchange.com/a/456636/499476
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
for file in $(<files.txt); do cp file_clone_source "$file"; done |
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
xargs -d "\n" touch -- < files.txt |
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
ls > files.txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment