Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Grep through a .tar file without untarring it Post 302935531 by DGPickett on Tuesday 17th of February 2015 10:47:03 AM
Old 02-17-2015
Writing Requirements pays better than Coding . . . . Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

grep for a tar File

Hello, I made a tar with a lot of file, and i deleted all the Files. So to win tile I want to make a grep of this tar file to search any text . Is there a Unix command available for this ? I tried : grep xyz file.tar but there is nothing . Thanks for your help.... (1 Reply)
Discussion started by: steiner
1 Replies

2. Shell Programming and Scripting

extract one file form .tar.gz without uncompressing .tar.gz file

hi all, kindly help me how to extract one file form .tar.gz without uncompressing .tar.gz file. thanks in advance bali (2 Replies)
Discussion started by: balireddy_77
2 Replies

3. Solaris

problem while untarring a .tarz file

Hi all, How to untar a file having .tarz extension? i tried this tar -xvfz file.tarz but i'm getting error like tar: z: unknown function modifier Usage: tar {c|r|t|u|x}] {file | -I include-file | -C directory file}... Can anyone help me out in this.... Thanks in advance.... (2 Replies)
Discussion started by: gullapalli
2 Replies

4. UNIX for Dummies Questions & Answers

tar -cvf test.tar `find . -mtime -1 -type f` only tar 1 file

Hi all, 4 files are returned when i issue 'find . -mtime -1 -type f -ls'. ./ora_475244.aud ./ora_671958.aud ./ora_934052.aud ./ora_934050.aud However, when I issued the below command: tar -cvf test.tar `find . -mtime -1 -type f`, the tar file only contains the 1st file -... (2 Replies)
Discussion started by: ahSher
2 Replies

5. Shell Programming and Scripting

Script Syntax on untarring file.

Trying to write a script to do the following. scp to all redhat linux host and install a antivirus tarball. Need to know what additional syntax to use to untar the file and execute the install.sh inside the tarball and then remove the tarball on all remote hosts. Here is what I have so... (2 Replies)
Discussion started by: soupbone38
2 Replies

6. Shell Programming and Scripting

untarring to the wrong dir

I am fairly new to scripting. I have a script to untar files as they come in. I keep scripts in one directory: /Scripts I get a tar'ed file in /Processing *CMD* $tar -xfv /Processing/File.tar When i run the script the untared files are placed in /Scripts i did some hunting around and... (2 Replies)
Discussion started by: purplebirky
2 Replies

7. Shell Programming and Scripting

How to grep the contents inside a tar file

Hi All I have searched the possibility of this options everywhere but am unable to find it in any forum. I have a tar file inside which there are n number of files and i dont know them. I need to grep a word inside the tar file and need to know in which file the word resides. > cat a... (2 Replies)
Discussion started by: Whiteboard
2 Replies

8. UNIX for Advanced & Expert Users

Size of a tarball without untarring - Catch parent tar ball has sub tars

hi, I am in a weird situation. I have a parent tarball which contains 2 sub tarballs. The structure is such : Parent.tar.gz ---- > child1.tar.gz and child2.tar.gz I need to get the size of the parent tarball without untaring it I know that the command is gunzip -c parent.tar.gz | wc -c ... (1 Reply)
Discussion started by: mnanavati
1 Replies

9. UNIX for Dummies Questions & Answers

Do I need to extract the entire tar file to confirm the tar folder is fine?

I would like to confirm my file.tar is been tar-ed correctly before I remove them. But I have very limited disc space to untar it. Can I just do the listing instead of actual extract it? Can I say confirm folder integrity if the listing is sucessful without problem? tar tvf file1.tar ... (1 Reply)
Discussion started by: vivien_chu
1 Replies

10. UNIX for Dummies Questions & Answers

UNIX command to check if file name ends with .tar OR if the file is a tar file

Hello Team, Would you please help me with a UNIX command that would check if file is a tar file. if we dont have that , can you help me with UNIX command that would check if file ends with .tar Thanks in advance. (10 Replies)
Discussion started by: sanjaydubey2006
10 Replies
GAMMU-SMSD-DBI(7)						       Gammu							 GAMMU-SMSD-DBI(7)

NAME
gammu-smsd-dbi - gammu-smsd(1) backend using DBI abstraction layer to use any supported database as a message storage DESCRIPTION
DBI backend stores all data in any database supported by libdbi, which parameters are defined by configuration (see gammu-smsdrc for description of configuration options). For tables description see gammu-smsd-tables. This backend is based on gammu-smsd-sql. Note The DBI driver is currently not supported on Windows because libdbi library does not support this platform. CONFIGURATION
Before running gammu-smsd you need to create necessary tables in the database. You can use examples given in database specific backends parts of this manual to do that. The configuration file then can look like: [smsd] service = sql driver = DBI_DRIVER host = localhost See also gammu-smsdrc SUPPORTED DRIVERS
For complete list of drivers for libdbi see libdbi-drivers project. The drivers for example include: o sqlite3 - for SQLite 3 o mysql - for MySQL o pgsql - for PostgeSQL o freetds - for MS SQL Server or Sybase CREATING TABLES
SQL script for creating tables in SQLite database: CREATE TABLE daemons ( Start TEXT NOT NULL, Info TEXT NOT NULL ); CREATE TABLE gammu ( Version INTEGER NOT NULL DEFAULT '0' ); INSERT INTO gammu (Version) VALUES (13); CREATE TABLE inbox ( UpdatedInDB NUMERIC NOT NULL DEFAULT (datetime('now')), ReceivingDateTime NUMERIC NOT NULL DEFAULT (datetime('now')), Text TEXT NOT NULL, SenderNumber TEXT NOT NULL DEFAULT '', Coding TEXT NOT NULL DEFAULT 'Default_No_Compression', UDH TEXT NOT NULL, SMSCNumber TEXT NOT NULL DEFAULT '', Class INTEGER NOT NULL DEFAULT '-1', TextDecoded TEXT NOT NULL DEFAULT '', ID INTEGER PRIMARY KEY AUTOINCREMENT, RecipientID TEXT NOT NULL, Processed TEXT NOT NULL DEFAULT 'false', CHECK (Coding IN ('Default_No_Compression','Unicode_No_Compression','8bit','Default_Compression','Unicode_Compression')) ); CREATE TRIGGER update_inbox_time UPDATE ON inbox BEGIN UPDATE inbox SET UpdatedInDB = datetime('now') WHERE ID = old.ID; END; CREATE TABLE outbox ( UpdatedInDB NUMERIC NOT NULL DEFAULT (datetime('now')), InsertIntoDB NUMERIC NOT NULL DEFAULT (datetime('now')), SendingDateTime NUMERIC NOT NULL DEFAULT (datetime('now')), SendBefore time NOT NULL DEFAULT '23:59:59', SendAfter time NOT NULL DEFAULT '00:00:00', Text TEXT, DestinationNumber TEXT NOT NULL DEFAULT '', Coding TEXT NOT NULL DEFAULT 'Default_No_Compression', UDH TEXT, Class INTEGER DEFAULT '-1', TextDecoded TEXT NOT NULL DEFAULT '', ID INTEGER PRIMARY KEY AUTOINCREMENT, MultiPart TEXT NOT NULL DEFAULT 'false', RelativeValidity INTEGER DEFAULT '-1', SenderID TEXT, SendingTimeOut NUMERIC NOT NULL DEFAULT (datetime('now')), DeliveryReport TEXT DEFAULT 'default', CreatorID TEXT NOT NULL, CHECK (Coding IN ('Default_No_Compression','Unicode_No_Compression','8bit','Default_Compression','Unicode_Compression')), CHECK (DeliveryReport IN ('default','yes','no')) ); CREATE INDEX outbox_date ON outbox(SendingDateTime, SendingTimeOut); CREATE INDEX outbox_sender ON outbox(SenderID); CREATE TRIGGER update_outbox_time UPDATE ON outbox BEGIN UPDATE outbox SET UpdatedInDB = datetime('now') WHERE ID = old.ID; END; CREATE TABLE outbox_multipart ( Text TEXT, Coding TEXT NOT NULL DEFAULT 'Default_No_Compression', UDH TEXT, Class INTEGER DEFAULT '-1', TextDecoded TEXT DEFAULT NULL, ID INTEGER, SequencePosition INTEGER NOT NULL DEFAULT '1', CHECK (Coding IN ('Default_No_Compression','Unicode_No_Compression','8bit','Default_Compression','Unicode_Compression')), PRIMARY KEY (ID, SequencePosition) ); CREATE TABLE pbk ( ID INTEGER PRIMARY KEY AUTOINCREMENT, GroupID INTEGER NOT NULL DEFAULT '-1', Name TEXT NOT NULL, Number TEXT NOT NULL ); CREATE TABLE pbk_groups ( Name TEXT NOT NULL, ID INTEGER PRIMARY KEY AUTOINCREMENT ); CREATE TABLE phones ( ID TEXT NOT NULL, UpdatedInDB NUMERIC NOT NULL DEFAULT (datetime('now')), InsertIntoDB NUMERIC NOT NULL DEFAULT (datetime('now')), TimeOut NUMERIC NOT NULL DEFAULT (datetime('now')), Send TEXT NOT NULL DEFAULT 'no', Receive TEXT NOT NULL DEFAULT 'no', IMEI TEXT PRIMARY KEY NOT NULL, Client TEXT NOT NULL, Battery INTEGER NOT NULL DEFAULT -1, Signal INTEGER NOT NULL DEFAULT -1, Sent INTEGER NOT NULL DEFAULT 0, Received INTEGER NOT NULL DEFAULT 0 ); CREATE TRIGGER update_phones_time UPDATE ON phones BEGIN UPDATE phones SET UpdatedInDB = datetime('now') WHERE IMEI = old.IMEI; END; CREATE TABLE sentitems ( UpdatedInDB NUMERIC NOT NULL DEFAULT (datetime('now')), InsertIntoDB NUMERIC NOT NULL DEFAULT (datetime('now')), SendingDateTime NUMERIC NOT NULL DEFAULT (datetime('now')), DeliveryDateTime NUMERIC NULL, Text TEXT NOT NULL, DestinationNumber TEXT NOT NULL DEFAULT '', Coding TEXT NOT NULL DEFAULT 'Default_No_Compression', UDH TEXT NOT NULL, SMSCNumber TEXT NOT NULL DEFAULT '', Class INTEGER NOT NULL DEFAULT '-1', TextDecoded TEXT NOT NULL DEFAULT '', ID INTEGER, SenderID TEXT NOT NULL, SequencePosition INTEGER NOT NULL DEFAULT '1', Status TEXT NOT NULL DEFAULT 'SendingOK', StatusError INTEGER NOT NULL DEFAULT '-1', TPMR INTEGER NOT NULL DEFAULT '-1', RelativeValidity INTEGER NOT NULL DEFAULT '-1', CreatorID TEXT NOT NULL, CHECK (Status IN ('SendingOK','SendingOKNoReport','SendingError','DeliveryOK','DeliveryFailed','DeliveryPending', 'DeliveryUnknown','Error')), CHECK (Coding IN ('Default_No_Compression','Unicode_No_Compression','8bit','Default_Compression','Unicode_Compression')) , PRIMARY KEY (ID, SequencePosition) ); CREATE INDEX sentitems_date ON sentitems(DeliveryDateTime); CREATE INDEX sentitems_tpmr ON sentitems(TPMR); CREATE INDEX sentitems_dest ON sentitems(DestinationNumber); CREATE INDEX sentitems_sender ON sentitems(SenderID); CREATE TRIGGER update_sentitems_time UPDATE ON sentitems BEGIN UPDATE sentitems SET UpdatedInDB = datetime('now') WHERE ID = old.ID; END; Note You can find the script in docs/sql/sqlite.sql as well. There are also scripts for other databases in same folder. UPGRADING TABLES
The easiest way to upgrade database structure is to backup old one and start with creating new one based on example above. For upgrading existing database, you can use changes described in smsd-tables-history and then manually update Version field in gammu ta- ble. AUTHOR
Michal iha <michal@cihar.com> COPYRIGHT
2009-2012, Michal iha <michal@cihar.com> 1.31.90 February 24, 2012 GAMMU-SMSD-DBI(7)
All times are GMT -4. The time now is 07:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy