Skip to main content
edited body
Source Link
kemotep
  • 5.4k
  • 7
  • 22
  • 36

If you are looking to simply mass create directories following a pattern you can use:

mkdir -p ~/{0001,0002,0003,...,XXXX}/{01,02,03,...,XX}

Make sure you substitute the variables with values you actually want to use so an example to create a sub-directory for years, months, and days would look like this:

mkdir -p ~/{19901998..19992018}/{Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec}/{01..31}

Then you can search through the months that do not have 31 days and remove them as described in this post. After that you have the task of sorting the photos into the proper directories. This is done very similar to finding and deleting and is described in this post.

Please note that this will create the sub-directories in your current working directory. As mentioned by user DopeGhoti, you can create a for loop to complete each step at once. Best of Luck!

If you are looking to simply mass create directories following a pattern you can use:

mkdir -p ~/{0001,0002,0003,...,XXXX}/{01,02,03,...,XX}

Make sure you substitute the variables with values you actually want to use so an example to create a sub-directory for years, months, and days would look like this:

mkdir -p ~/{1990..1999}/{Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec}/{01..31}

Then you can search through the months that do not have 31 days and remove them as described in this post. After that you have the task of sorting the photos into the proper directories. This is done very similar to finding and deleting and is described in this post.

Please note that this will create the sub-directories in your current working directory. As mentioned by user DopeGhoti, you can create a for loop to complete each step at once. Best of Luck!

If you are looking to simply mass create directories following a pattern you can use:

mkdir -p ~/{0001,0002,0003,...,XXXX}/{01,02,03,...,XX}

Make sure you substitute the variables with values you actually want to use so an example to create a sub-directory for years, months, and days would look like this:

mkdir -p ~/{1998..2018}/{Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec}/{01..31}

Then you can search through the months that do not have 31 days and remove them as described in this post. After that you have the task of sorting the photos into the proper directories. This is done very similar to finding and deleting and is described in this post.

Please note that this will create the sub-directories in your current working directory. As mentioned by user DopeGhoti, you can create a for loop to complete each step at once. Best of Luck!

Source Link
kemotep
  • 5.4k
  • 7
  • 22
  • 36

If you are looking to simply mass create directories following a pattern you can use:

mkdir -p ~/{0001,0002,0003,...,XXXX}/{01,02,03,...,XX}

Make sure you substitute the variables with values you actually want to use so an example to create a sub-directory for years, months, and days would look like this:

mkdir -p ~/{1990..1999}/{Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec}/{01..31}

Then you can search through the months that do not have 31 days and remove them as described in this post. After that you have the task of sorting the photos into the proper directories. This is done very similar to finding and deleting and is described in this post.

Please note that this will create the sub-directories in your current working directory. As mentioned by user DopeGhoti, you can create a for loop to complete each step at once. Best of Luck!