Skip to content

Instantly share code, notes, and snippets.



Last active Dec 23, 2015
What would you like to do?
Python script for running touch on a list of directories, and their contents
# run with: python <directory_name>
# touches all contents of <directory_name>, and recurses into subdirectories.
# WARNING! don't run unless you actually intend to do all that touching.
# some things, should not be touched.
# Copyright 2013, Alex Ausch
# Free to use under attribution license:
import os, sys, subprocess
for d,s,fs in os.walk(sys.argv[1]):
for p in (s+fs):["touch",os.path.join(d,p)])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.