Skip to main content

putting things in folders

Comments

4 comments

  • cPanelMichael
    Hello, The behavior you see matches how the "cp" command works on your OS (e.g. CentOS). It's not specific to cPanel. Thank you.
    0
  • Dan Lester
    Nope. My OS interprets "cp x y" as a command to copy the file x into the folder y (if y is a folder). That's Unix standard. I certainly don't have to do "cp x y/" to do that.
    0
  • cPanelMichael
    Hello, Here's the behavior I see on a test system running CentOS 7 with cPanel installed:
    # cd /root/testing123 # ls -al total 4 drwxr-xr-x 3 root root 22 Dec 11 13:11 . dr-xr-x---. 16 root root 4096 Dec 11 13:10 .. -rw-r--r-- 1 root root 0 Dec 11 13:11 x drwxr-xr-x 2 root root 6 Dec 11 13:11 y # cp x y # ls -al y/ total 0 drwxr-xr-x 2 root root 14 Dec 11 13:12 . drwxr-xr-x 3 root root 22 Dec 11 13:11 .. -rw-r--r-- 1 root root 0 Dec 11 13:12 x
    Thus, it's working as expected without the need to use "y/" in the "cp" command. You may want to check with your hosting provider to determine if they are using custom bash settings on the system. Thank you.
    0
  • Dan Lester
    OK, thanks. Yes, it must be my hosting provider that is doing something strange. First time I've ever seen it that you can use an identical name for a file and a folder in the same directory. But in my cPanel system, y and y/ are different things.
    0

Please sign in to leave a comment.