WordPress.org

Ready to get started?Download WordPress

Forums

Elementary TAR Question (5 posts)

  1. ryanozawa
    Member
    Posted 9 years ago #

    O, great WordPress and UNIX Gurus, perhaps you can help where many, many online MAN pages have failed me. I'm quite practiced at installing WordPress from scratch with the command:

    tar -xvzf wordpress.x.x.x.tar.gz

    Which unpacks everything nice and neat into a new subdirectory called 'wordpress.'

    Now. Can't I use a variation on the same command to unpack a WordPress version upgrade over an existing one? My problem is, my WordPress install directories have different names. If I have an existing WordPress install in:

    public_html/user/blogs/bobsblog

    How do I unpack a WordPress upgrade over the WordPress files in 'bobsblog'? What's the UNIX command? I know this is elementary, but I just can't figure it out!

    Thanks plenty!

  2. dommega
    Member
    Posted 9 years ago #

    Change a directory = cd
    List files = ll (long list) // ls (short list)
    Show hidden files = ls -a
    Show files with Ksize = l -h
    vi or vim = enter in vi or vim mode
    Create a file = touch (touch file.txt)
    Make a directory = mkdir directoryname
    Root directory = /
    Copy a file = cp
    Move a file = mv
    Remove a file = rm
    Remove a directory = rm -r
    Clear screen = clear
    Tar a file = tar -cvf file.tar directory/
    UnTar a file = tar -xvf file.tar
    Zip a tar = gunzip
    UnZip a tar = gzip
    Find = grep -l something somewhere
    Open a file = open filename
    Auto complete = tab
    Easy Read and write = chmod a+w filename

  3. ryanozawa
    Member
    Posted 9 years ago #

    But what's the command to UnTar a file into a specific directory? That is, I'm guessing that within wordpress-x.x.x.tar.gz, the directory name 'wordpress' is specified as the default. But I want what's in 'wordpress' to go into 'bobsblog' instead. Isn't there a way to do this?

  4. ryanozawa
    Member
    Posted 9 years ago #

    Anyone? Anyone? Bueller?

  5. MichaelH
    Member
    Posted 9 years ago #

    Don't think you're going to get there with tar. Remember that the program lone-tar had a zWHERE flag to specify what directory the 'restore' was placed but it would still end up with the wordpress subdirectory under the zWHERE specification.

    Guess you could extract files, rename the folder wordpress to bobsblog, then create your own tar file.

Topic Closed

This topic has been closed to new replies.

About this Topic