Creating rar files

Hi, was wondering if someone could help me, I'm looking for a program that will compress files in the .rar format. I've found rarosx, but as I'm not really proficient in using Terminal I'm having trouble getting it to work. Is there a quick drop and compress program (or failing that can anyone give me a very quick rundown on the commands to get rarosx program to run in terminal.) Thanks.

20 inch Imac, Mac OS X (10.4.9)

Posted on May 28, 2007 6:56 AM

Reply
12 replies

May 28, 2007 7:16 AM in response to Peter Walsh

Hi Peter

The command-line "rar" has a lot of options, but you can use it to create basic archive files quite simply. If your rar application is on your Desktop, go into the Terminal and issue the following command (don't press return yet, but do leave a space after the "archivefile" (which is the name of the file you'll create - you can of course change this)

./Desktop/rar a archivefile

Now, go into the Finder, and multiple-highlight the files and/or folders you want to put into the archive. Arrange the Finder and Terminal windows so that you can drag the files into the Terminal. The names of all the files will appear after "archivefile", for example:

./Desktop/rar a archivefile /Users/myuser/file1.txt /Users/myuser/file2.txt

Now hit return. You'll see the new archivefile.rar appear in the same location as the "rar" program.

You can avoid having to type "Desktop" each time by moving the application into the top of your user folder. Another way to do it is to change your shell profile to have the system look for the file in a location you choose, but I can give you more details on that if you need them.

Post back if you have any questions!

Matt

May 28, 2007 10:18 AM in response to Matt Clifton

Sorry probably should of warned you my Terminal experience is very limited, in fact I'm a terminal gumby! So I tried to follow your instructions but alas I failed. It maybe helpful to tell you before going on what I'm try to 'rar'. Its mp3 folders ie whole CDs to put on a blog.
What I've done (and it hasn't worked) is open a new terminal window and type in - ./Desktop/rar a archivefile - I've then dragged the folder into terminal and pressed return. The rar program is on the desktop. The d/load address of the rar program is - http://www.tdfast.com/macdld/rarosx-3.6.0.tar.gz
Can you see what I'm doing wrong??
Thanks,
Peter

May 28, 2007 12:33 PM in response to Peter Walsh

When I extracted the d/load on to the desktop, it created a folder with a a number of text files (nothing of note) and a couple of terminal windows. The only terminal window that opens with anything is the one entitled rar it brings up the following...

/Users/XXXXXXX/Desktop/rar/rar; exit
Welcome to Darwin!
You have mail.
XXXX-XXXXXs-Computer-2:~ XXXXXXX$ /Users/XXXXXXX/Desktop/rar/rar; exit
RAR 3.60 Copyright (c) 1993-2006 Alexander Roshal 5 Aug 2006
Shareware version Type RAR -? for help
Usage: rar <command> -<switch 1> -<switch N> <archive> <files...>
<@listfiles...> <pathtoextract\>
<Commands>
a Add files to archive
c Add archive comment
cf Add files comment
ch Change archive parameters
cw Write archive comment to file
d Delete files from archive
e Extract files to current directory
f Freshen files in archive
i[par]=<str> Find string in archives
k Lock archive
l[t,b] List archive [technical, bare]
m[f] Move to archive [files only]
p Print file to stdout
r Repair archive
rc Reconstruct missing volumes
rn Rename archived files
rr[N] Add data recovery record
rv[N] Create recovery volumes
s[name|-] Convert archive to or from SFX
t Test archive files
u Update files in archive
v[t,b] Verbosely list archive [technical,bare]
x Extract files with full path
<Switches>
- Stop switches scanning
ad Append archive name to destination path
ag[format] Generate archive name using the current date
ap<path> Set path inside archive
as Synchronize archive contents
av Put authenticity verification (registered versions only)
av- Disable authenticity verification check
c- Disable comments show
cfg- Disable read configuration
cl Convert names to lower case
** Convert names to upper case
df Delete files after archiving
dh Open shared files
ds Disable name sort for solid archive
e[+]<attr> Set file exclude and include attributes
ed Do not add empty directories
en Do not put 'end of archive' block
ep Exclude paths from names
ep1 Exclude base directory from names
ep3 Expand paths to full including the drive letter
f Freshen files
fcu[file] Read archive comment from Unicode file
hp[password] Encrypt both file data and headers
id[c,d,p,q] Disable messages
ierr Send all messages to stderr
ilog[name] Log errors to file (registered versions only)
inul Disable all messages
isnd Enable sound
k Lock archive
kb Keep broken extracted files
m<0..5> Set compression level (0-store...3-default...5-maximal)
mc<par> Set advanced compression parameters
md<size> Dictionary size in KB (64,128,256,512,1024,2048,4096 or A-G)
ms[ext;ext] Specify file types to store
n<file> Include only specified file
n@ Read file names to include from stdin
n@<list> Include files in specified list file
o+ Overwrite existing files
o- Do not overwrite existing files
ol Save symbolic links as the link instead of the file
or Rename files automatically
ow Save or restore file owner and group
p[password] Set password
p- Do not query password
r Recurse subdirectories
r0 Recurse subdirectories for wildcard names only
rr[N] Add data recovery record
rv[N] Create recovery volumes
s[<N>,v[-],e] Create solid archive
s- Disable solid archiving
sfx[name] Create SFX archive
si[name] Read data from standard input (stdin)
sl<size> Process files with size less than specified
sm<size> Process files with size more than specified
t Test files after archiving
ta<date> Process files modified after <date> in YYYYMMDDHHMMSS format
tb<date> Process files modified before <date> in YYYYMMDDHHMMSS format
tk Keep original archive time
tl Set archive time to latest file
tn<time> Process files newer than <time>
to<time> Process files older than <time>
ts<m,c,a>[N] Save or restore file time (modification, creation, access)
u Update files
v Create volumes with size autodetection or list all volumes
v<size>[k,b] Create volumes with size=<size>*1000 [*1024, *1]
ver[n] File version control
vn Use the old style volume naming scheme
vp Pause before each volume
w<path> Assign work directory
x<file> Exclude specified file
x@ Read file names to exclude from stdin
x@<list> Exclude files in specified list file
y Assume Yes on all queries
z[file] Read archive comment from file
logout
[Process completed]


When i used your line nothing happened...sorry to be a pain but I really need to figure this one out...THANKS A BUNCH, Peter

20 inch Imac Mac OS X (10.4.9)

May 28, 2007 12:44 PM in response to Peter Walsh

Ah, now I see what you're doing. You actually need to start a new Terminal window, using the Terminal app you'll find in your Applications/Utilitites folder.
(Actually, if Terminal is still open on your system, you can also use the cmd-N keystroke or File - New Shell to create a new window.)

This will just drop you into a command line prompt and you will be able to run that command as above.

Matt

May 28, 2007 7:36 PM in response to Peter Walsh

Matt here's what the terminal window looks like if I try executing your command with a Nirvana single folder. My user name is the same as my login so I won't bother XXXXX my name as in the above example....

Last login: Tue May 29 12:29:38 on ttyp1
Welcome to Darwin!
You have mail.
Peter-Walshs-Computer-2:~ peterwalsh$ ./Desktop/rar a archivefile/Users/peterwalsh/Music/iTunes/iTunes\ Music/Nirvana/You\ Know\ You\'re\ Right\ CD\ single/
-bash: ./Desktop/rar: is a directory
Peter-Walshs-Computer-2:~ peterwalsh$

May 28, 2007 8:33 PM in response to Peter Walsh

Hi Peter

My brain is foggy this evening, and I can't construct the correct Unix command to run that command from the Desktop, but here are two workarounds:

1) Move the "rar" program directly to the top of your user folder, or
2) Before you issue the "rar" command in Terminal, type "cd Desktop" which will change directory to the desktop.

let me know if either of those works for you...

Matt

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Creating rar files

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.