Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 04-25-2010, 08:03 AM   #1
LQ Newbie
Registered: Apr 2010
Posts: 8

Rep: Reputation: 0


i have an assignment for shool and i have a question.

I have to zip de home directory to a location but i can't seem to get it done.

I have succeeded to zip a folder within the home folder (Music folder)
but when i try to zip the entire home folder i get an error.
I have tried different ways but no success so far.

Can anyone give me a clue?

This is what i tried so far:

1) tar cf backup_homedir.tgz ../
2) tar cf backup_homedir.tgz /home/indur

Error message: ( i hope i translate it well because my language isn't english, so the message isn't as well)
tar: backup_homedir.tgz: Function open () failed: access denied
tar: unrecoverable error -- tar is closing

Extra info

I am in GUI mode and i'm not logged in as root

Hope someone can push me in the right direction.
Old 04-25-2010, 08:25 AM   #2
Registered: Feb 2009
Location: Goa(India)-Sharjah(UAE)
Distribution: RHEL,centos,fedora,ubuntu
Posts: 229

Rep: Reputation: 18
tar -zcvf fr.tar /home/francis
try this
where fr.tar is the compressed directory and /home/francis should be replaced by your home directory path
Old 04-25-2010, 08:49 AM   #3
LQ Guru
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,629

Rep: Reputation: 2944Reputation: 2944Reputation: 2944Reputation: 2944Reputation: 2944Reputation: 2944Reputation: 2944Reputation: 2944Reputation: 2944Reputation: 2944Reputation: 2944
tgz = a tar and gziped file, alternative ending would be tar.gz

Problem is that tar cf = create a tar file and nothing to do with compression

As fernfrancis has mentioned you can use "z" option for gzipped files.
If you do a man on tar it will explain the different compression types you can use.
Old 04-25-2010, 09:57 AM   #4
LQ Newbie
Registered: Apr 2010
Posts: 8

Original Poster
Rep: Reputation: 0
Ok thanks!

This info was usefull altough it didn't lead to the solution.
But i have found it myself.

Really simple (stupid

I was in a write protected directory when i executed the script, therefore the tar file couldn't be created.

Thanks for the reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Firefox Scripting Add-on (Scripting HTML / Javascript inside Firefox) linuxbeatswindows Programming 1 09-18-2009 11:09 PM
Scripting in C - need help hifivoyager Linux - Newbie 9 02-06-2009 09:47 PM
scripting pr0xibus Programming 7 01-23-2009 05:36 PM
Scripting aznium Programming 17 09-03-2006 02:37 AM
teaching shell scripting: cool scripting examples? fax8 Linux - General 1 04-20-2006 05:29 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:42 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration