Skip to content

Tag: rename

Linux rename s/ – regex for wildcard single characte r

I have found a simple solution to my actual requirement, but I would still like to understand how to use the regex equivalent of the single character wildcard ? which we use for filtering … in say ls I would like to rename a group of files which differ by one character. FROM TO As I said above, my simple

Can someone help me with rename tool? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers. We don’t allow questions about general computing hardware and software on Stack Overflow. You can edit the question so it’s on-topic for Stack Overflow. Closed last year. Improve this question I have to rename a bunch of files with this structure (it is a serie):

rename files which produced by split

I splitted the huge file and output is several files which start by x character. I want to rename them and make a list which sorted by name like below: part-1.gz part-2.gz part-3.gz … I tried below CMD: for (( i = 1; i <= 3; i++ )) ;do for f in `ls -l | awk ‘{print $9}’ | grep

Remove part of file name in multiple sub directories

The main folder “Main” contains multiple subfolders (6900,159, 9997, …) and each subfolder contains 8 items (4 files (, 6900Log.out, 6900Log.progress.out,, 3 folders (6900_STARgenome, 6900_STARpass1, 6900_STARtmp), and one compressed file (6900Aligned.sortedByCoord.out.bam)). The 6900_STARtmp contain further subfolders but I don’t want to change name of sub folders present in 6900_STARtmp. Please see the image I want to remove 6900 from

Linux rename with a variable character?

I have a list of files eg. How do I use rename to be like this: I am new to this and having trouble understanding the examples online. I want to do something like the following where the ? is a variable character: Answer ? mean “any character”. So, your page-1.htm will be rename because it’s match with pattern page-?.htm