LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Closed Thread
  Search this Thread
Old 10-11-2003, 01:19 PM   #31
arunshivanandan
Member
 
Registered: May 2003
Location: Kerala,India
Distribution: RedHat,Mandrake,Debian
Posts: 643

Rep: Reputation: 30

NAME
rename - Rename files

SYNOPSIS
rename from to file...

DESCRIPTION
rename will rename the specified files by replacing the
first occurrence of from in their name by to.

For example, 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.
SEE ALSO
mv(1)

1 Januari 2000 RENAME(1)
(END)
---------------------------------------------
1.januvari is january
2.what is the mv connection??
3.does this thread deserve to be such a long one??(when there are lots of other "Ghost" threads which seems 'never to get answered')
 
Old 10-11-2003, 02:06 PM   #32
oopicmaster
Member
 
Registered: Sep 2003
Posts: 154

Original Poster
Rep: Reputation: 30
All Im saying is that mv should have been designed to be consistent whether you are dealing with 1 file or multiple files.

If a multiple file move requires a directory for the second argument, then moving a single file should be the same.

Renaming multiple files can wreak just as much havoc on a system as moving them. If you make a mistake on a rename command your system can wind up just as broken as it would if you made a mistake on a move command.
 
Old 10-11-2003, 02:16 PM   #33
megaspaz
Senior Member
 
Registered: Nov 2002
Location: Silly Con Valley
Distribution: Red Hat 7.3, Red Hat 9.0
Posts: 2,054

Rep: Reputation: 46
Quote:
Originally posted by oopicmaster
All Im saying is that mv should have been designed to be consistent whether you are dealing with 1 file or multiple files.

If a multiple file move requires a directory for the second argument, then moving a single file should be the same.

Renaming multiple files can wreak just as much havoc on a system as moving them. If you make a mistake on a rename command your system can wind up just as broken as it would if you made a mistake on a move command.
if you want the dos style syntax because you can't wrap your brain around the unix way, this was posted earlier.

http://freshmeat.net/projects/ren/
 
Old 10-11-2003, 02:17 PM   #34
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Quote:
Originally posted by oopicmaster
All Im saying is that mv should have been designed to be consistent whether you are dealing with 1 file or multiple files.

If a multiple file move requires a directory for the second argument, then moving a single file should be the same.

Renaming multiple files can wreak just as much havoc on a system as moving them. If you make a mistake on a rename command your system can wind up just as broken as it would if you made a mistake on a move command.
I think what is being missed is that an asterix "*" is expanded by the bash shell to pass sall matching files to the program as arguments. Therefore it is not the program that sees the * it is the shell you are working in. I hope that makes things a bit clearer for you.
 
Old 10-11-2003, 02:20 PM   #35
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 48
Quote:
Originally posted by oopicmaster
All Im saying is that mv should have been designed to be consistent whether you are dealing with 1 file or multiple files.

If a multiple file move requires a directory for the second argument, then moving a single file should be the same.
"should" is kind of a useless stance when it comes to Unix commands. either get over it and learn how to use the command, or use windows. or program your own OS.
 
Old 10-11-2003, 02:21 PM   #36
arunshivanandan
Member
 
Registered: May 2003
Location: Kerala,India
Distribution: RedHat,Mandrake,Debian
Posts: 643

Rep: Reputation: 30
let me ask you guys a question?What would asteric(*) represent in target file.i think
Code:
sh-2.05$ ls
abc.abcd
sh-2.05$ mv abc.abcd *.abcd 
mv: `abc.abcd' and `abc.abcd' are the same file
sh-2.05$ mv abc.abcd b *.abcd 
mv: when moving multiple files, last argument must be a directory
Try `mv --help' for more information.
sh-2.05$ mv abc.abcd  b*.abcd 
sh-2.05$ ls
b*.abcd
this means an asteric in target file will not be replaced with something else.i.e,a terget file abc*.txt is a single file with the name abc*.txt.and you cant copy a number of files into a single file.got it??
 
Old 10-11-2003, 02:28 PM   #37
defcon8
LQ Newbie
 
Registered: Sep 2003
Posts: 4

Rep: Reputation: 0
fuck off you n00bass fuck that cant be assed to RTFM you shouldnt even view such elite things compared to your inferiority
 
Old 10-11-2003, 02:33 PM   #38
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 48
Quote:
Originally posted by defcon8
***
yikes, well that was a bit harsh in my judgment.
 
Old 10-11-2003, 02:33 PM   #39
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
Quote:
Originally posted by defcon8
fsck off you n00bass fsck that cant be assed to RTFM you shouldnt even view such elite things compared to your inferiority
Please try to stay on topic. We are here to help people not belittle them.

Please make sure you read the rules before posting again:
http://www.linuxquestions.org/rules.php
Quote:
* Do not post if you do not have anything constructive to say in the post.
 
Old 10-11-2003, 02:34 PM   #40
mossy
Member
 
Registered: Aug 2003
Location: USexIRL
Distribution: *nix
Posts: 849

Rep: Reputation: 30
the learning curve on Linux/Unix is higher.
You are trying to so some commands that are "not where the beginner starts".

It may be better to learn the basic commands first then progress to more administrative tasks by command line.

Then again if you are very familiar with Dos you may feel right at home creating more complex commands or trying out the odd script etc.

I am sure that once you actually learn something you wll find the nix world to be way more versatile than your previous OS.

Then again considering the display of arrogance you may feel deprived of the ego in a new environment and may feel happier sticking with DoS.



Means nothing to any of us I am sure.


 
Old 10-11-2003, 02:38 PM   #41
synaptical
Senior Member
 
Registered: Jun 2003
Distribution: Mint 13/15, CentOS 6.4
Posts: 2,020

Rep: Reputation: 48
Quote:
Originally posted by arunshivanandan
this means an asteric in target file will not be replaced with something else.i.e,a terget file abc*.txt is a single file with the name abc*.txt.and you cant copy a number of files into a single file.got it??
yeah, the * ceases to act as a wildcard when it's in the destination file. so that is very literal and logical.
 
Old 10-11-2003, 04:41 PM   #42
oopicmaster
Member
 
Registered: Sep 2003
Posts: 154

Original Poster
Rep: Reputation: 30
Quote:
I am sure that once you actually learn something you wll find the nix world to be way more versatile than your previous OS.

I doubt it.


The nix world was, is, and always will be, outside of mainstream computing.

Mainly due to the fact that nix savvy technical folk, are WAY too conservative

The PROBLEM that Linux has introduced is the attempt to move the nix world into the world of mainstream home computing.

It aint gonna happen as long as there are legions of ultra conservative nix users around who believe that the CURRENT nix way of doing things is the ONLY way they should be done.

Plain and simple.

The design of the mv command is a mistake when it comes to home computing. It should be corrected or eliminated.

Quote:
Actually if you want to get specific about the comparison between cp and mv commands, the way mv writes, i dont think that the file is actually copied from one location to another, and then deleted. the data isnt actually moved around on disk unless you move it to /usr/local, or another partition that you have set up besides your root one. it has more to do with where the file points to on disk, and not just that its in a different directory....hence why you need to defrag once in a while
This statement references the underlying IMPLEMENTATION detail of copy/delete vs. mv.

This argument is completely irrelevant!

Why?

Because to the end user the the end result of a copy/delete vs mv is THE SAME.

The end user doesnt care whether an actual "File Copy" has occurred or not.

In otherwords, if mv is embedded into cp... (which I think it should be) The user doesnt care how the underlying implementation actually moves the file.

By having 2 separate commands you force the user to learn 2 separate commands.... Not good.... users want to only learn 1 command, not 2.

SO....

If Linus is listening...

You want to improve Linux?

Get rid of mv!

oh yeah, and while you are at it.... get rid of rmdir too... Kay?

Great!

Now all I have to learn is 2 commands insead of 4.... Thanks...
 
Old 10-11-2003, 05:17 PM   #43
mossy
Member
 
Registered: Aug 2003
Location: USexIRL
Distribution: *nix
Posts: 849

Rep: Reputation: 30
Well I tend to agree it is complicated. The basic reason is-

Programmers had just created their own commands at will - there are stocks and stocks of them. Basically more people heard about a particular way to do things and it is still used.

You will find there are many ways to do the same thing.
Just pick which one suits you. There are tonnes of shortcuts. However when scripting [keeping in mind corporations administration] certain comands will allow for better maneuverability for parameters and attaching them to other commands. This has also kept certain commands alive. So it is worth getting familiar with each variant - even tho it may not be a shortcut for a simpler task at times.
 
Old 10-11-2003, 05:21 PM   #44
mossy
Member
 
Registered: Aug 2003
Location: USexIRL
Distribution: *nix
Posts: 849

Rep: Reputation: 30
And there's only one thumb up for windows - the fact that Gates got every farmer and his dog on a computer. I respect him for that - even though it is not the best OS - he dragged and enticed the general population into the compouter age. People should give them their credit.

Do I like Windows? Not really - I prefer to get everything working on a more versatile and stable [when configged] OS. I don't like 'em, don't hate 'em.
 
Old 10-11-2003, 05:23 PM   #45
mossy
Member
 
Registered: Aug 2003
Location: USexIRL
Distribution: *nix
Posts: 849

Rep: Reputation: 30
"Because to the end user the the end result of a copy/delete vs mv is THE SAME".

~ this reasoning is ONE of the reasons why Windows is less stable.

i.e. ~ poor coding.

End Of Story.
 
  


Closed Thread



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
March of the Penguins movie - Thumbs up! J.W. General 2 07-10-2005 07:04 PM
Thumbs Up To Linux! redfedora88 LinuxQuestions.org Member Success Stories 3 03-22-2005 07:35 PM
Thumbs up for Suse 9.1 Wolfgang67 Linux - Distributions 18 08-05-2004 08:30 PM
2 thumbs up for linux. xode LinuxQuestions.org Member Success Stories 2 11-23-2003 05:57 PM
winex - 5 thumbs up! kazuni LinuxQuestions.org Member Success Stories 8 06-05-2003 07:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:27 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