Page 1 of 1
[SOLVED] How to extract all xzm files to one folder only
Posted: 03 Sep 2017, 11:05
by Blaze
Anybody knows how to extract all xzm files to one folder only?
For example, I have 1st.xzm, 2nd.xzm, 3rd.xzm and 1 folder.
I want extract all zxm files to this folder.
xzm2dir *.xzm folder
does not wotk.
How to extract all xzm files to one folder only
Posted: 03 Sep 2017, 11:20
by fanthom
Hi Blaze,
I'm using this script:
Code: Select all
#!/bin/sh
cd `pwd`
for x in `find -type f | fgrep .xzm | sort`; do unsquashfs -n -f $x >/dev/null; done
It unpacks all modules even if they are placed in subfolders.
How to extract all xzm files to one folder only
Posted: 03 Sep 2017, 13:46
by wread
Great!
One can patch 05-devel mit /usr/bin/extractxzms by fanthom!
How to extract all xzm files to one folder only
Posted: 03 Sep 2017, 13:49
by ncmprhnsbl
i've been using (from the folder of xzms):
Code: Select all
for a in *.xzm; do xzm2dir $a /path/to/directory; done
what fanthom has is better tho(for the sub folders bit)
How to extract all xzm files to one folder only
Posted: 03 Sep 2017, 15:16
by Blaze
Wow, this is what I need.
It's save me a lot of time.
Thanks.
[SOLVED] How to extract all xzm files to one folder only
Posted: 03 Sep 2017, 19:31
by Ed_P
Excuse my ignorance fanthom but what is the pwd directory?
[SOLVED] How to extract all xzm files to one folder only
Posted: 03 Sep 2017, 19:55
by wread
pwd=print (name of) working directory
[SOLVED] How to extract all xzm files to one folder only
Posted: 03 Sep 2017, 22:39
by Ed_P
^ Really!!
Thank you
wread
[SOLVED] How to extract all xzm files to one folder only
Posted: 09 Sep 2017, 15:31
by Blaze
fanthom wrote: ↑03 Sep 2017, 11:20
Code: Select all
#!/bin/sh
cd `pwd`
for x in `find -type f | fgrep .xzm | sort`; do unsquashfs -n -f $x >/dev/null; done
The same in current directory
Code: Select all
for x in `find . -type f | fgrep .xzm | sort`; do unsquashfs -n -f $x >/dev/null; done