Sponsored Content
Full Discussion: Help with rar
Top Forums UNIX for Dummies Questions & Answers Help with rar Post 302450367 by Corona688 on Thursday 2nd of September 2010 12:03:50 PM
Old 09-02-2010
Quote:
Originally Posted by farneville
Second part not working though..
Try nawk instead of awk if you're not on a linux system. Beyond that, my crystal ball's still down for maintenance -- what error messages is it printing?

Quote:
can you explain what the code does?

ls -l |awk '/^d/ {print $NF}' |while read LINE
feeds the output of ls -l through awk, which (I think) filters out anything but directories, and then feeds it into the while loop which reads them one at a time into LINE.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

extracting .rar files

Hi, Can someone throw light on opening a .rar file? thanks, sskb (5 Replies)
Discussion started by: sskb
5 Replies

2. UNIX for Dummies Questions & Answers

how to extract a .rar file

Hi ! I have a abc.rar file. I want to extract this file.. pls help. OS Details : SunOS papillon 5.10 Generic_127111-11 sun4us sparc FJSV,GPUZC-M (1 Reply)
Discussion started by: dashok.83
1 Replies

3. UNIX for Dummies Questions & Answers

How can i open rar files

Is there a way to open rar files on linux i would really appretiate if u would help :) (2 Replies)
Discussion started by: abu_malek
2 Replies

4. Red Hat

How to open RAR files?

May be this is a newbie question but i want to know hoe to open the RAR file in linux? (1 Reply)
Discussion started by: ashok.g
1 Replies

5. Solaris

Extract .rar format files in Solaris

Hi All, Is there way to extract the .rar format files in Solaris Thanks, Mani Muthu (3 Replies)
Discussion started by: k_manimuthu
3 Replies

6. UNIX for Dummies Questions & Answers

Unzip a .rar file

Hi, How to unzip a .rar file in unix. I tried unrar command but it doesnt work. Any help will be appreciated Thanks (10 Replies)
Discussion started by: irudayaraj
10 Replies

7. Fedora

Problem installing rar and unrar

Good day all, I am trying to install rar and unrar on fedora 16. In terminal root, when I try to do : # cp rar unrar /bin I get the following error message: cp: cannot stat `rar': No such file or directory cp: cannot stat `unrar': No such file or directory can anyone please... (7 Replies)
Discussion started by: peter_071
7 Replies

8. UNIX for Dummies Questions & Answers

Using a rar file on a suse linux

Hi, I have this file in .rar format and need to use it on a suse linux system. I have transfered the file into the system and tried to unpack it using unrar command but i got this l# unrar e Alarm.rar UNRAR 3.51 freeware Copyright (c) 1993-2005 Alexander Roshal ??? - the file header... (5 Replies)
Discussion started by: mena
5 Replies

9. UNIX for Dummies Questions & Answers

How To Split A File In Two Rar Parts?

I Am connected to Whatbox.ca Seed Box Via SSH!! i have a file named avicii.mp3. I Want to split it into two rar parts as Apart1.rar and Apart2.rar So That When i Download Both the parts to My PC And Extract Them They Come out As Whole Avicii.mp3. There is also one more problem!! When I Rar A... (18 Replies)
Discussion started by: anime12345
18 Replies

10. UNIX for Beginners Questions & Answers

Rar files

hi unix expert is there any program in linux to compress files or directory with rar (.rar)? i am using centos 7 many thanks samad (1 Reply)
Discussion started by: abdossamad2003
1 Replies
RAR_LIST(3)								 1							       RAR_LIST(3)

RarArchive::getEntries - Get full list of entries from the RAR archive

       Object oriented style (method):

SYNOPSIS
public array RarArchive::getEntries (void ) DESCRIPTION
Procedural style: array rar_list (RarArchive $rarfile) Get entries list (files and directories) from the RAR archive. Note If the archive has entries with the same name, this method, together with RarArchive foreach iteration and array-like access with numeric indexes, are the only ones to access all the entries (i.e., RarArchive::getEntry and the rar:// wrapper are insufficient). PARAMETERS
o $rarfile - A RarArchive object, opened with rar_open(3). RETURN VALUES
rar_list(3) returns array of RarEntry objects or FALSE on failure. CHANGELOG
+--------+---------------------------------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------------------------------+ | 3.0.0 | | | | | | | Support for RAR archives with repeated entry | | | names is no longer defective. | | | | +--------+---------------------------------------------------+ EXAMPLES
Example #1 Object oriented style <?php $rar_arch = RarArchive::open('solid.rar'); if ($rar_arch === FALSE) die("Could not open RAR archive."); $rar_entries = $rar_arch->getEntries(); if ($rar_entries === FALSE) die("Could retrieve entries."); echo "Found " . count($rar_entries) . " entries. "; foreach ($rar_entries as $e) { echo $e; echo " "; } $rar_arch->close(); ?> The above example will output something similar to: Found 2 entries. RarEntry for file "tese.txt" (23b93a7a) RarEntry for file "unrardll.txt" (2ed64b6e) Example #2 Procedural style <?php $rar_arch = rar_open('solid.rar'); if ($rar_arch === FALSE) die("Could not open RAR archive."); $rar_entries = rar_list($rar_arch); if ($rar_entries === FALSE) die("Could retrieve entries."); echo "Found " . count($rar_entries) . " entries. "; foreach ($rar_entries as $e) { echo $e; echo " "; } rar_close($rar_arch); ?> SEE ALSO
RarArchive::getEntry, rar:// wrapper. PHP Documentation Group RAR_LIST(3)
All times are GMT -4. The time now is 10:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy