Results 1 to 5 of 5

Thread: I guess I am SLOW - How to copy the contents of a hidden directory to a visible one

  1. #1
    Join Date
    Oct 2010
    Location
    Sweden
    Beans
    817
    Distro
    Ubuntu 16.04 Xenial Xerus

    Unhappy I guess I am SLOW - How to copy the contents of a hidden directory to a visible one

    OK - let me start off by saying I must be brain dead.
    I'm trying to copy the contents of ~/.todo.actions.d to /home/john/SpiderOak/todo.actions.d-hidden-addons
    (Ideally the new directory would simply not have a . in front of it's name...)

    This doesn't do what I want:

    Code:
    cp -r ~/.todo.actions.d ~/SpiderOak/todo.actions.d-hidden-addons
    with this code I get a directory called .todo.actions.d inside one called todo.actions.d-hidden-addons.




    What I want is for any new files and only the files in .todo.actions.d to be copied to the directory called todo.actions.d-hidden-addons

    I've done this in the past, but for the life of me can not remember how.
    Have mercy on a moron
    Last edited by GrouchyGaijin; April 22nd, 2013 at 11:57 PM.
    Thank you,
    GG -----------
    GUI we don't need no stinking GUI: A collection of Bash scripts
    Mutt (email), cmus (music),Google Calendar and Google Tasks cli

  2. #2
    Join Date
    Apr 2008
    Beans
    968

    Re: I guess I am SLOW - How to copy the contents of a hidden directory to a visible o

    Try this instead -

    Code:
    cp -r ~/.todo.actions.d/* ~/SpiderOak/todo.actions.d-hidden-addons

  3. #3
    Join Date
    Apr 2012
    Beans
    6,808

    Re: I guess I am SLOW - How to copy the contents of a hidden directory to a visible o

    Try

    Code:
    cp -r ~/.todo.actions.d/* ~/SpiderOak/todo.actions.d-hidden-addons
    [Actually I'd probably do

    Code:
    cp -r ~/.todo.actions.d/* ~/SpiderOak/todo.actions.d-hidden-addons/
    where the trailing slash on the target asserts that it is a directory - not compulsory in this case but it prevents accidents if the directory doesn't exist]

  4. #4
    Join Date
    Nov 2012
    Location
    Halloween Town
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: I guess I am SLOW - How to copy the contents of a hidden directory to a visible o

    Is this what you're looking for:
    Code:
    cp t1/. t2/ -R
    The dot at the end tells it to copy the contents of the current directory, not the directory itself. This method also includes hidden files and folders.
    Please mark your thread as solved if you get a satisfactory response
    PopularPages - A Ubuntu Documentation Search Tool
    Ubuntu membership via Forums contributions

  5. #5
    Join Date
    Oct 2010
    Location
    Sweden
    Beans
    817
    Distro
    Ubuntu 16.04 Xenial Xerus

    Re: I guess I am SLOW - How to copy the contents of a hidden directory to a visible o

    Thanks Guys!
    Thank you,
    GG -----------
    GUI we don't need no stinking GUI: A collection of Bash scripts
    Mutt (email), cmus (music),Google Calendar and Google Tasks cli

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •