daily log 9.14.20
How to see the files you’ve created today
TODAY I LEARNED TO LIST ALL THE FILES I CREATED WITHIN THE LAST 24 HOURS!!
find . -mtime -1 -type f -print
EXPORT TO A CSV
find . -mtime -1 -type f -print > opened-today.csv
I also learned that if you do that in your parent directory, you will have a zillion of cache files. This was an interesting learning moment for me… WHAT IS HAPPENING IN ALL OF THOSE CACHE FILES?!?!
How to analyze the files you’ve created today
BEFORE THAT WORKED I TRIED:
a workaround!
def get_parent(file):
return file.split('/')[1]
df['main'] = df.apply(lambda x: get_parent(x['files']), axis=1)
df
another workaround!
new_df = og_df.copy()
new_df['files'] = new_df['files'].str.replace("/", "---")
new_df
nd = new_df['files'].str.split('---', 0, expand=True)
nd