Say I have a directory that contains the following:
dir1/ dir2/ dir3/ ... dir50/ dir1.txt dir2.txt dir3.txt ... dir50.txt
I have been using mv dir* /someotherpath/, then move the *.txt files back. If there a way to move only the directories?
If your directory structure is only 1 level deep
You can also use find to accomplish this task
Change maxdepth parameter or remove it if you directory structure has more levels