LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 05-12-2016, 10:16 AM   #1
mojhsin13
LQ Newbie
 
Registered: May 2016
Posts: 4

Rep: Reputation: Disabled
Question URgent


Hi
Can anybody solve this scenario it will be gratefull to me

Suppose I have a directory which contains the files like e.g-'ramu~12.html'or 'saaaare~233.html'.
my requirement is I want to convert the name of these files like this
permanently ''ramu.html' .... etc. there are 1000 of such files.The new file must contain the contents of the file.

please write down the code in Unics or suggest me how to do this ?

u can ping me at mohsinbuksh5@gmail.com
 
Old 05-12-2016, 11:25 AM   #2
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 10,005

Rep: Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191Reputation: 3191
Firstly, 'Urgent' in no way describes the problem except that it is important to you.

Secondly, what have you tried and where are you stuck? The mv command can handle the copying to a new name or the rename command can complete the entire process.

No one here will write the code for you without seeing some attempt from you.
 
1 members found this post helpful.
Old 05-12-2016, 11:33 AM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,617

Rep: Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963Reputation: 7963
Quote:
Originally Posted by mojhsin13 View Post
Hi
Can anybody solve this scenario it will be gratefull to me

Suppose I have a directory which contains the files like e.g-'ramu~12.html'or 'saaaare~233.html'.
my requirement is I want to convert the name of these files like this
permanently ''ramu.html' .... etc. there are 1000 of such files.The new file must contain the contents of the file.

please write down the code in Unics or suggest me how to do this ?

u can ping me at mohsinbuksh5@gmail.com
Also, you need to read the LQ Rules about text speak and NOT using it, and NO ONE here is going to 'ping you' via email. We aren't the place to come for free, personalized, one-on-one email support/tutorials.

You can either write a script, or spend a few seconds on Google to figure out how to rename files. You may actually even want to look at the man page for the RENAME command??
 
Old 05-12-2016, 11:50 AM   #4
keefaz
LQ Guru
 
Registered: Mar 2004
Distribution: Slackware
Posts: 6,552

Rep: Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872Reputation: 872
Quote:
Originally Posted by mojhsin13 View Post
Hi

please write down the code in Unics or suggest me how to do this ?
Quote:
Someone else spelled it with the letter X; no one can remember who.
http://www.linuxjournal.com/article/7035
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
boot sector and lilo collapse !!!!! URGENT URGENT URGEN !!!!! frelihm Linux - Software 21 12-02-2009 10:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration