BashScripts.org
http://bashscripts.org/forum/

how to compress unknown filename
http://bashscripts.org/forum/viewtopic.php?f=8&t=1611
Page 1 of 1

Author:  ganitolngyundre [ Thu Jul 12, 2012 1:44 am ]
Post subject:  how to compress unknown filename

Hi, I've made a simple backup script. can anyone complete what I'm doing? I'm lost at the most important part of it.

here's the script

Code:
#!/bin/bash
cd /path/to/where/backupis/
ls -lh
# how to compress the showed file on ls -lh?
tar -zcf unknownfilename.tar.gz *missing* #<--i don't know how?


I hope someone will get my point.

Thanks
J

Author:  Watael [ Sat Jul 14, 2012 3:17 pm ]
Post subject:  Re: how to compress unknown filename

hi,

observe what does:
Code:
echo *
and you'll have your answer.
see man bash /^ *Pathname Expansion

Page 1 of 1 All times are UTC - 6 hours
© 2000, 2002, 2005, 2007 phpBB Group • http://www.phpbb.com