Sponsored Content
Top Forums UNIX for Beginners Questions & Answers Renaming batch by removing substring Post 303032195 by stomp on Wednesday 13th of March 2019 10:54:22 AM
Old 03-13-2019
Ubuntu should have rename(a perl script) available and installed:


Code:
rename 's/(.*).tex.txt/$1.txt/' *.txt

This User Gave Thanks to stomp For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Removing substring from a string

Hi. I want to remove a substring from a string. If I use the "tr" command, it doesn't seem to to what I want it to: echo './somestring.dat' | tr -d './' results in somestringdat I want it to remove only occurances of the string './', rather than the individual character. The result... (1 Reply)
Discussion started by: dmilks
1 Replies

2. UNIX for Dummies Questions & Answers

Batch Renaming: Change files' extensions in many sub-directories

Hi all - I'm trying to rename a large number of files all at once and need some help figuring out the command line syntax to do it. I've already done quite a bit of research with the rename and mv commands, but so far haven't found a solution that seems to work for me. So: The files exist... (10 Replies)
Discussion started by: dave920
10 Replies

3. Shell Programming and Scripting

removing items from a file with batch

Please assist with awk scirpts: I need to remove items from a file in a batch: The file that I will remove from has the following format: abc00tef:10.81.12.3 abc01tef:10.81.12.3 abc02tef:10.81.12.3 abc03tef:10.81.12.3 abc04tef:10.81.12.3 abc05tef:10.81.12.3 I have a file which... (5 Replies)
Discussion started by: amir07
5 Replies

4. Shell Programming and Scripting

batch renaming ...

hi all, given a path, for example : /<pwd>/artist/album/ what i would like to do is to rename the album directory like that : /<pwd>/artist/artist | album/ and i would like to do the latter for all the "artist" directories and for all the "album" directories that belong to an artist ... (4 Replies)
Discussion started by: OneDreamCloser
4 Replies

5. UNIX for Dummies Questions & Answers

Batch Renaming of Files

Hello all, thanks for your time (and this forum, what an awesome resource for newbs like myself!) Anyways, I've been given the task of importing content from a directory of about...7000 HTML files. They are all named appropriately and broken down by name depending on what book they belong too.... (8 Replies)
Discussion started by: gratefulhokie
8 Replies

6. Shell Programming and Scripting

script for renaming a batch of files

hi i have a folder full of files. some of the names are quite off because the dimensions were the same and i had to put a 'b' after the initial number so that it didnt overwrite. what i want is a script in unix to overwrite the filwe name leaving some of the title intact, e.g. below are some... (3 Replies)
Discussion started by: shabs1985
3 Replies

7. Shell Programming and Scripting

BASH Batch renaming insert additional zero into filename

Hi all, Wondering how this could be accomplished........ a directory contains sequentially numbered files from fw01 to fw999. How would I insert an additional zero so that the directory lists these files in a proper manner? (i.e. all double digit files from fw01 to fw99 would become... (3 Replies)
Discussion started by: putter1900
3 Replies

8. Shell Programming and Scripting

Need help in batch renaming files with bash shell script.

I have some 50+ files in the following format : abcd_vish_running_ZEBRA_20140818.dat_08-14-2014_23:08:23 abcd_vish_running_ZEB-RA_20140818.dat_08-14-2014_23:08:35 abcd_vish_running_ZEB_RA_20140818.dat_08-14-2014_23:08:37 abcd_vish_running_RI-NG_20140818.dat_08-14-2014_23:08:42... (5 Replies)
Discussion started by: SriRamKrish
5 Replies

9. Shell Programming and Scripting

Renaming file in batch

Hi guys, I need a script to change the file names e.g.:- below are the mentioned files, i want t0 change the last character of the name 00000.cdr with e.g bep01.smsc.191214210500-00000.cdr to bep01.smsc.191214210500-92311.cdr next file be like bep01.smsc.191214210500-92312.cdr # ls -ltr... (9 Replies)
Discussion started by: mfaizan40
9 Replies

10. Shell Programming and Scripting

Script for batch renaming

What is wrong with this script to rename batch of similar files? For example renaming all *.txt files to *.tab . $ for i in seq {01..10}; do touch ${i}.txt; done $ ./rename.sh *.txt txt tab Error: mv: ‘01.txt’ and ‘01.txt’ are the same file. Code is: #!/usr/bin/bash # renames.sh #... (6 Replies)
Discussion started by: yifangt
6 Replies
tapset::nfsd(3stap)													       tapset::nfsd(3stap)

NAME
tapset::nfsd - systemtap nfsd tapset DESCRIPTION
nfsd.dispatch NFS server receives an operation from client See probe::nfsd.dispatch(3stap) for details. nfsd.proc.lookup NFS server opening or searching for a file for client See probe::nfsd.proc.lookup(3stap) for details. nfsd.proc.read NFS server reading file for client See probe::nfsd.proc.read(3stap) for details. nfsd.proc.write NFS server writing data to file for client See probe::nfsd.proc.write(3stap) for details. nfsd.proc.commit NFS server performing a commit operation for client See probe::nfsd.proc.commit(3stap) for details. nfsd.proc.create NFS server creating a file for client See probe::nfsd.proc.create(3stap) for details. nfsd.proc.remove NFS server removing a file for client See probe::nfsd.proc.remove(3stap) for details. nfsd.proc.rename NFS Server renaming a file for client See probe::nfsd.proc.rename(3stap) for details. nfsd.open NFS server opening a file for client See probe::nfsd.open(3stap) for details. nfsd.close NFS server closing a file for client See probe::nfsd.close(3stap) for details. nfsd.read NFS server reading data from a file for client See probe::nfsd.read(3stap) for details. nfsd.write NFS server writing data to a file for client See probe::nfsd.write(3stap) for details. nfsd.commit NFS server committing all pending writes to stable storage See probe::nfsd.commit(3stap) for details. nfsd.lookup NFS server opening or searching file for a file for client See probe::nfsd.lookup(3stap) for details. nfsd.create NFS server creating a file(regular,dir,device,fifo) for client See probe::nfsd.create(3stap) for details. nfsd.createv3 NFS server creating a regular file or set file attributes for client See probe::nfsd.createv3(3stap) for details. nfsd.unlink NFS server removing a file or a directory for client See probe::nfsd.unlink(3stap) for details. SEE ALSO
probe::nfsd.dispatch(3stap), probe::nfsd.proc.lookup(3stap), probe::nfsd.proc.read(3stap), probe::nfsd.proc.write(3stap), probe::nfsd.proc.commit(3stap), probe::nfsd.proc.create(3stap), probe::nfsd.proc.remove(3stap), probe::nfsd.proc.rename(3stap), probe::nfsd.open(3stap), probe::nfsd.close(3stap), probe::nfsd.read(3stap), probe::nfsd.write(3stap), probe::nfsd.commit(3stap), probe::nfsd.lookup(3stap), probe::nfsd.create(3stap), probe::nfsd.createv3(3stap), probe::nfsd.unlink(3stap), probe::nfsd.rename(3stap), stap(1), stapprobes(3stap) IBM
--- tapset::nfsd(3stap)
All times are GMT -4. The time now is 01:57 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy