Skip to main content

All Questions

Tagged with
1 vote
1 answer
773 views

Create directory using filenames and move the files to its respective folder

My question is a bit different than: Create directory using filenames and move the files to its repective folder Since in the same folder I have two similar copy of each file like: 001.txt and 001(1)....
Maxfield's user avatar
  • 161
0 votes
1 answer
245 views

Creating directories inside a directory, from variable values, to redirect output from sed

I am trying to take a file, modify this file by using a value from a for loop (using sed) and redirecting it to a directory that has been created during the same for loop. Original file > Make ...
Nankin's user avatar
  • 5
-2 votes
1 answer
272 views

Move every 500 files in new directory [closed]

I have a directory that contains 10,665 jpeg files. I want to move 500 files to a new directory, and 500 to the next directory, etc. The largest files must be moved first: 500-1 contains the 500 ...
Fakhamatia's user avatar
0 votes
1 answer
6k views

Loop to create subdirectories in multiple directories

I want to create subdirectories into each of directories below. I used the following loop: #! bash /# dir m3z m3t m3t2 m3g m3g2 m3g3 ... n dir for d in m3z m3t m3t2 m3g m3g2 m3g3 ... n ...
Djegdjiga AMAZOUZ's user avatar
1 vote
2 answers
487 views

How to create a script to make a structure and sort files by moving them into directories?

I have a bunch of files which all have a first line being a date. All of them start with the same first 2 letters being "ff". I need to create a script which would use that first line in all files and ...
Mantas's user avatar
  • 11
1 vote
1 answer
40 views

Create subdirectories under a parent but prompt for the name of the parent

I use SCP a lot to transfer log files from servers to a jumpbox where I can analyse and troubleshoot etc. If I have a cluster of servers and I want to create a set of subdirectories I do it like this: ...
Moif Murphy's user avatar