Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Re: Re: moving files from folder1 to folder2

by haoess (Curate)
on May 14, 2004 at 23:26 UTC ( #353524=note: print w/replies, xml ) Need Help??


in reply to Re: Re: moving files from folder1 to folder2
in thread moving files from folder1 to folder2

What is your difference between moving and renaming? In UNIX language, you can rename a file if source and destination are in the same filesystem (aka partition). That's very fast, because only inode information is changed. If they are not: You copy the source file to destination and unlink the source file. That's the way it goes.

If you use perl's rename, you should take care about this. That's why I pointed you to the CPAN module. It takes this care for you and does the same as mv(1) does (if renaming is not possible): Read the source file and write it to its destination.

-- Frank

  • Comment on Re: Re: Re: moving files from folder1 to folder2

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://353524]
help
Chatterbox?
[karlgoethebier]: no saturday night special?
[karlgoethebier]: AKA bla, bla
LanX night fever ... ha ha ha ha staying alive ...
[karlgoethebier]: No sack of rice fell over in China?
[karlgoethebier]: PM is going down...
[LanX]: ♪..♫ Don't cry for me Mandarina .......♩..♬
[karlgoethebier]: ...pasta bolded too soft in Eately?
[karlgoethebier]: BOILED!
[karlgoethebier]: OK, at least a cool song: https://www. youtube.com/watch? v=jU4caMqKssg

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (6)
As of 2017-10-21 15:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (270 votes). Check out past polls.

    Notices?