Register
It is currently Wed Oct 22, 2014 6:15 am

how to compress unknown filename


All times are UTC - 6 hours


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 PostPosted: Thu Jul 12, 2012 1:44 am   

Joined: Thu Jun 21, 2012 8:11 pm
Posts: 3
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


Top
 Profile  
 PostPosted: Sat Jul 14, 2012 3:17 pm   

Joined: Mon Mar 02, 2009 3:03 am
Posts: 550
hi,

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


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP