This will first list the files containing extension tar.gz, and then awk will get the file names which is column 9 in
ls -lrth command, and
NF > 2 will remove the blank line and
tar -xvzf will extract files names contained in variable $i,
Like this we can experiment various operations like renaming all files with specific extension of so and can fiddled with to achieve various goals.
for i in `ls -lrth *.tar.gz |awk 'NF>2 {print $9}'`; do tar -xvzf $i; done
ls -lrth command, and
NF > 2 will remove the blank line and
tar -xvzf will extract files names contained in variable $i,
Like this we can experiment various operations like renaming all files with specific extension of so and can fiddled with to achieve various goals.
for i in `ls -lrth *.tar.gz |awk 'NF>2 {print $9}'`; do tar -xvzf $i; done
No comments:
Post a Comment
Thank you for Commenting Will reply soon ......