Find the answer to your Linux question:
Results 1 to 2 of 2
how do i create a script file which will copy all the files in one file directory to another file directory. using cp? how do i write the whoel thing? ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Sep 2005
    Posts
    2

    another newbie question


    how do i create a script file which will copy all the files in one file directory to another file directory.

    using cp? how do i write the whoel thing?

    thank you very much

  2. #2
    Linux Guru dylunio's Avatar
    Join Date
    Aug 2004
    Location
    Cymru
    Posts
    4,157
    The command to do this would be
    Code:
    cp -r /place/where/files/are/* /place /where/files/go/
    If you want to make a bash script out of that, just do:
    #!/bin/bash

    cp -r /place/where/files/are/* /place /where/files/go/
    save the file and then
    Code:
    chmod +x filename
    hope this helps
    Registered Linux User #371543!
    Get force-get May The Source Be With You
    /dev/null
    /dev/null2

Posting Permissions

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