copy and past command

Discussion in 'Command Line' started by am007, Aug 10, 2012.

  1. am007

    am007 New Member

    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Hi,

    I have linux server and I want copy this folder /var/www/html/radiusmanager from HDD to USB memory and edit it and replace this folder on HDD .

    How I can do it Help me please.

    Thanks

  2. Kerms

    Kerms New Member

    Messages:
    59
    Likes Received:
    12
    Trophy Points:
    0
    the command `cp'. Its usage can be read from its manual page, usually via `man' (man cp).
    If the directory tree needs to have ther permissions kept, I recommend using the flag combination of `p', `r' and `v'.
    So,
    cp -prv [src] [dst]

    Also, since you're moving it onto a flash drive, I recommend creating an archive of `/var/www/html/radiusmanager' , or whatever your target is. This improves IO time--less wait on waiting for the USB to be completely written to. (It also indirectly improves the lifespan (compared to not archiving) of the USB drive by writing less files.)

    For the archiving, I recommend using the command `tar' and the bzip2 compression:
    tar -cj [directory] > [archivename].tar.bz2

    Lastly, for the curtsey for me, and every other support across every other support forum, try to google it first. Usually, 99% of the time, whatever you're doing, whatever you are trying to do, someone else has already done it.

Share This Page