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)
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)
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)
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)
Need help - hopefully I explain it correctly
I have a table in mysql database with multiple fields.
2 of the fields are called id and id_link
id id_link
93 http://test_server/testpage.cgi?93
95
96
97
98
I need to find the correct sql to update all of the id_link... (2 Replies)
Hi friends ,
i want to change the filename as below
filename=ABC_HYND_JDHD_20130125120345.txt
expected output : ABC_HYND_JDHD_20130125.txt
i have tried using awk but not able to procedd futher. i am trying to do the above in single commad.
echo... (3 Replies)
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)
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)
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)
I wish to rename all files ending in .txt by removing .tex.
Currently I have
me@me-Inspiron-518:~$ ls
a.tex.txt bin b.tex.txt c.tex.txt Desktop Documents Downloads d.tex.txt Music Pictures Public Templates VideosDesired outcome
me@me-Inspiron-518:~$ ls
a.txt ... (2 Replies)
Discussion started by: Xubuntu56
2 Replies
LEARN ABOUT CENTOS
rename
RENAME(1) User Commands RENAME(1)NAME
rename - rename files
SYNOPSIS
rename [options] expression replacement file...
DESCRIPTION
rename will rename the specified files by replacing the first occurrence of expression in their name by replacement.
OPTIONS -v, --verbose
Give visual feedback which files where renamed, if any.
-V, --version
Display version information and exit.
-s, --symlink
Peform rename on symlink target
-h, --help
Display help text and exit.
EXAMPLES
Given the files foo1, ..., foo9, foo10, ..., foo278, the commands
rename foo foo0 foo?
rename foo foo0 foo??
will turn them into foo001, ..., foo009, foo010, ..., foo278. And
rename .htm .html *.htm
will fix the extension of your html files.
WARNING
The renaming has no safeguards. If the user has permission to rewrite file names, the command will perform the action without any ques-
tions. For example, the result can be quite drastic when the command is run as root in the /lib directory. Always make a backup before
running the command, unless you truly know what you are doing.
SEE ALSO mmv(1), mv(1)AVAILABILITY
The rename command is part of the util-linux package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/.
util-linux June 2011 RENAME(1)