Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Re^4: Directory Separator (none)

by vsespb (Chaplain)
on May 28, 2013 at 23:39 UTC ( #1035749=note: print w/replies, xml ) Need Help??

in reply to Re^3: Directory Separator (none)
in thread Directory Separator

rsync, for one, disagrees

rsync man

this ok:

A trailing slash on the source changes this behavior to avoid creating an additional directory level at the destination. You can think of a trailing / on a source as meaning “copy the contents of this directory” as opposed to “copy the directory by name”
But here we see that leading '/' sometimes does not mean root
if the pattern starts with a / then it is matched against the start of the filename, otherwise it is matched against the end of the filename.
Thus “/foo” would match a file called “foo” at the transfer-root (see above for how this is different from the filesystem-root).

I think filename is filename. It points to file. When you passing arguments to command line programs - it's different thing - sometimes you need special syntax, depending on what you want to do

"mv foo bar/" is only the same as "mv foo bar" if you are 100% sure that bar already exists and is a directory.

yep, but there are problems when it's symlink to a directory example

Also basename

In the usual case, dirname() returns the string up to, but not including, the final '/'

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1035749]
shmem is bored... sending limericks to the auth log

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (11)
As of 2018-02-20 15:57 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (271 votes). Check out past polls.