Monday, August 15, 2011

Download apache directory listings recursively

To apache directory listings recursively, use wget like below:

$ wget -r -np -nH -R index.html http://filestodownload/

where -r is for recursive retrieving, -np is for no-parent option where wget won't get the parent directory when retrieving recursively, -nH equals to no host diretories where generation of host-prefixed directories will be disabled and -R is to omit index.html.



Friday, August 5, 2011

Extract rpm without installing

Run below command:

$ rpm2cpio packagename.rpm | cpio -idmv 
where rpm2cpio will change rpm file to cpio, -i is for extract, -d is to create leading directories where needed, -m is to preserve modification time and -v is for verbose mode.