LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 04-01-2012, 03:24 PM   #1
Raakh5
Member
 
Registered: Mar 2012
Posts: 174

Rep: Reputation: Disabled
I am trying to make archive files along with folders


Hello,

Code:
rar a 01042012.rar UserType/*
When am running this command then its making rar file but not keeping the directory hierarchy e.g. the UserType/* contains sub folder like:
UserType
|--40
|----1
|----2
|--50
|-----1
|-----2
|-----many files
etc.

Please advise

Thanks & best regards
 
Old 04-01-2012, 03:38 PM   #2
colucix
LQ Guru
 
Registered: Sep 2003
Location: Bologna
Distribution: CentOS 6.5 OpenSuSE 12.3
Posts: 10,509

Rep: Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983Reputation: 1983
Actually it should preserve the directory structure! What if you do:
Code:
rar a -r 01042012.rar UserType
? However, I don't think it makes any difference. Rather take in mind that when extracting the archive, the e command extracts all the files in the current directory, whereas the x command preserves the original directory structure. This is true for both the unrar and rar applications.
 
1 members found this post helpful.
Old 04-01-2012, 03:38 PM   #3
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and CentOS
Posts: 6,724

Rep: Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705Reputation: 1705
Hi,

I don't use rar (prefering the free tar), but did you consider trying:

Code:
rar a 01042012.rar UserType
Evo2.
 
Old 04-01-2012, 03:50 PM   #4
Raakh5
Member
 
Registered: Mar 2012
Posts: 174

Original Poster
Rep: Reputation: Disabled
Thanks a lot

Best regards
 
  


Reply



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
[SOLVED] How do I make a browser distinguish between files and folders? damgar Slackware 2 10-23-2010 05:29 PM
BASH: Unzip files/folders from archive one at a time using a loop cade Programming 3 05-16-2010 10:48 PM
find -exec command to recursively delete files and folders in folders with X name Joan Murt Linux - Newbie 2 07-08-2009 04:35 PM
Can drakbackup archive the different folders, with separate archiving files? bistra Mandriva 5 02-18-2008 09:28 AM
Can you make any files and folders created within a directory owned by another user?? helptonewbie Linux - Newbie 13 12-14-2007 04:21 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:53 PM.

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