Skip to content

Instantly share code, notes, and snippets.

@virtual
Last active June 12, 2020 15:25
Show Gist options
  • Select an option

  • Save virtual/8e4241a4826e57b60e6be7e2f06cf8df to your computer and use it in GitHub Desktop.

Select an option

Save virtual/8e4241a4826e57b60e6be7e2f06cf8df to your computer and use it in GitHub Desktop.
Move all sidenavs
## Changes side nav structure from ./includes/_sidenav.inc to ./_nav.inc for all subfolders
# example, move all _sidenav.inc files up a level (outside includes folder)
find . -mindepth 3 -name "*.inc" -type f -execdir mv "{}" $(dirname "{}")/.. \;
# remove all folders named includes
find . -name includes -type d -exec rm -rf {} \;
# rename all _sidenav.inc to _nav.inc
find . -name "_sidenav.inc" -type f -execdir mv "{}" _nav.inc \;
## Cleaning up files
find . -name "*.DOC" -type f -delete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment