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-PGSQL(7)						       Gammu						       GAMMU-SMSD-PGSQL(7)

NAME
gammu-smsd-pgsql - gammu-smsd(1) backend using PostgreSQL database server as a message storage DESCRIPTION
PGSQL backend stores all data in a PostgreSQL database server, which parameters are defined by configuration (see gammu-smsdrc for descrip- tion of configuration options). For tables description see gammu-smsd-tables. This backend is based on gammu-smsd-sql. CONFIGURATION
Before running gammu-smsd you need to create necessary tables in the database, which is described below. The configuration file then can look like: [smsd] service = sql driver = native_pgsql host = localhost See also gammu-smsdrc CREATING TABLES
SQL script for creating tables in PostgreSQL database: -- -- Database: "smsd" -- -- CREATE USER "smsd" WITH NOCREATEDB NOCREATEUSER; -- CREATE DATABASE "smsd" WITH OWNER = "smsd" ENCODING = 'UTF8'; -- connect "smsd" "smsd" -- COMMENT ON DATABASE "smsd" IS 'Gammu SMSD Database'; -- -------------------------------------------------------- -- -- Function declaration for updating timestamps -- CREATE LANGUAGE plpgsql; CREATE OR REPLACE FUNCTION update_timestamp() RETURNS trigger AS $update_timestamp$ BEGIN NEW."UpdatedInDB" := LOCALTIMESTAMP(0); RETURN NEW; END; $update_timestamp$ LANGUAGE plpgsql; -- -------------------------------------------------------- -- -- Sequence declarations for tables' primary keys -- --CREATE SEQUENCE inbox_ID_seq; --CREATE SEQUENCE outbox_ID_seq; --CREATE SEQUENCE outbox_multipart_ID_seq; --CREATE SEQUENCE pbk_groups_ID_seq; --CREATE SEQUENCE sentitems_ID_seq; -- -------------------------------------------------------- -- -- Index declarations for tables' primary keys -- --CREATE UNIQUE INDEX inbox_pkey ON inbox USING btree ("ID"); --CREATE UNIQUE INDEX outbox_pkey ON outbox USING btree ("ID"); --CREATE UNIQUE INDEX outbox_multipart_pkey ON outbox_multipart USING btree ("ID"); --CREATE UNIQUE INDEX pbk_groups_pkey ON pbk_groups USING btree ("ID"); --CREATE UNIQUE INDEX sentitems_pkey ON sentitems USING btree ("ID"); -- -------------------------------------------------------- -- -- Table structure for table "daemons" -- CREATE TABLE daemons ( "Start" text NOT NULL, "Info" text NOT NULL ); -- -- Dumping data for table "daemons" -- -- -------------------------------------------------------- -- -- Table structure for table "gammu" -- CREATE TABLE gammu ( "Version" smallint NOT NULL DEFAULT '0' ); -- -- Dumping data for table "gammu" -- INSERT INTO gammu ("Version") VALUES(13); -- -------------------------------------------------------- -- -- Table structure for table "inbox" -- CREATE TABLE inbox ( "UpdatedInDB" timestamp(0) WITHOUT time zone NOT NULL DEFAULT LOCALTIMESTAMP(0), "ReceivingDateTime" timestamp(0) WITHOUT time zone NOT NULL DEFAULT LOCALTIMESTAMP(0), "Text" text NOT NULL, "SenderNumber" varchar(20) NOT NULL DEFAULT '', "Coding" varchar(255) NOT NULL DEFAULT 'Default_No_Compression', "UDH" text NOT NULL, "SMSCNumber" varchar(20) NOT NULL DEFAULT '', "Class" integer NOT NULL DEFAULT '-1', "TextDecoded" text NOT NULL DEFAULT '', "ID" serial PRIMARY KEY, "RecipientID" text NOT NULL, "Processed" boolean NOT NULL DEFAULT 'false', CHECK ("Coding" IN ('Default_No_Compression','Unicode_No_Compression','8bit','Default_Compression','Unicode_Compression')) ); -- -- Dumping data for table "inbox" -- -- -------------------------------------------------------- -- -- Create trigger for table "inbox" -- CREATE TRIGGER update_timestamp BEFORE UPDATE ON inbox FOR EACH ROW EXECUTE PROCEDURE update_timestamp(); -- -------------------------------------------------------- -- -- Table structure for table "outbox" -- CREATE TABLE outbox ( "UpdatedInDB" timestamp(0) WITHOUT time zone NOT NULL DEFAULT LOCALTIMESTAMP(0), "InsertIntoDB" timestamp(0) WITHOUT time zone NOT NULL DEFAULT LOCALTIMESTAMP(0), "SendingDateTime" timestamp NOT NULL DEFAULT LOCALTIMESTAMP(0), "SendBefore" time NOT NULL DEFAULT '23:59:59', "SendAfter" time NOT NULL DEFAULT '00:00:00', "Text" text, "DestinationNumber" varchar(20) NOT NULL DEFAULT '', "Coding" varchar(255) NOT NULL DEFAULT 'Default_No_Compression', "UDH" text, "Class" integer DEFAULT '-1', "TextDecoded" text NOT NULL DEFAULT '', "ID" serial PRIMARY KEY, "MultiPart" boolean NOT NULL DEFAULT 'false', "RelativeValidity" integer DEFAULT '-1', "SenderID" varchar(255), "SendingTimeOut" timestamp(0) WITHOUT time zone NOT NULL DEFAULT LOCALTIMESTAMP(0), "DeliveryReport" varchar(10) 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"); -- -- Dumping data for table "outbox" -- -- -------------------------------------------------------- -- -- Create trigger for table "outbox" -- CREATE TRIGGER update_timestamp BEFORE UPDATE ON outbox FOR EACH ROW EXECUTE PROCEDURE update_timestamp(); -- -------------------------------------------------------- -- -- Table structure for table "outbox_multipart" -- CREATE TABLE outbox_multipart ( "Text" text, "Coding" varchar(255) NOT NULL DEFAULT 'Default_No_Compression', "UDH" text, "Class" integer DEFAULT '-1', "TextDecoded" text DEFAULT NULL, "ID" serial, "SequencePosition" integer NOT NULL DEFAULT '1', PRIMARY KEY ("ID", "SequencePosition"), CHECK ("Coding" IN ('Default_No_Compression','Unicode_No_Compression','8bit','Default_Compression','Unicode_Compression')) ); -- -- Dumping data for table "outbox_multipart" -- -- -------------------------------------------------------- -- -- Table structure for table "pbk" -- CREATE TABLE pbk ( "ID" serial PRIMARY KEY, "GroupID" integer NOT NULL DEFAULT '-1', "Name" text NOT NULL, "Number" text NOT NULL ); -- -- Dumping data for table "pbk" -- -- -------------------------------------------------------- -- -- Table structure for table "pbk_groups" -- CREATE TABLE pbk_groups ( "Name" text NOT NULL, "ID" serial PRIMARY KEY ); -- -- Dumping data for table "pbk_groups" -- -- -------------------------------------------------------- -- -- Table structure for table "phones" -- CREATE TABLE phones ( "ID" text NOT NULL, "UpdatedInDB" timestamp(0) WITHOUT time zone NOT NULL DEFAULT LOCALTIMESTAMP(0), "InsertIntoDB" timestamp(0) WITHOUT time zone NOT NULL DEFAULT LOCALTIMESTAMP(0), "TimeOut" timestamp(0) WITHOUT time zone NOT NULL DEFAULT LOCALTIMESTAMP(0), "Send" boolean NOT NULL DEFAULT 'no', "Receive" boolean NOT NULL DEFAULT 'no', "IMEI" varchar(35) 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 ); -- -- Dumping data for table "phones" -- -- -------------------------------------------------------- -- -- Create trigger for table "phones" -- CREATE TRIGGER update_timestamp BEFORE UPDATE ON phones FOR EACH ROW EXECUTE PROCEDURE update_timestamp(); -- -------------------------------------------------------- -- -- Table structure for table "sentitems" -- CREATE TABLE sentitems ( "UpdatedInDB" timestamp(0) WITHOUT time zone NOT NULL DEFAULT LOCALTIMESTAMP(0), "InsertIntoDB" timestamp(0) WITHOUT time zone NOT NULL DEFAULT LOCALTIMESTAMP(0), "SendingDateTime" timestamp(0) WITHOUT time zone NOT NULL DEFAULT LOCALTIMESTAMP(0), "DeliveryDateTime" timestamp(0) WITHOUT time zone NULL, "Text" text NOT NULL, "DestinationNumber" varchar(20) NOT NULL DEFAULT '', "Coding" varchar(255) NOT NULL DEFAULT 'Default_No_Compression', "UDH" text NOT NULL, "SMSCNumber" varchar(20) NOT NULL DEFAULT '', "Class" integer NOT NULL DEFAULT '-1', "TextDecoded" text NOT NULL DEFAULT '', "ID" serial, "SenderID" varchar(255) NOT NULL, "SequencePosition" integer NOT NULL DEFAULT '1', "Status" varchar(255) 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"); -- -- Dumping data for table "sentitems" -- -- -------------------------------------------------------- -- -- Create trigger for table "sentitems" -- CREATE TRIGGER update_timestamp BEFORE UPDATE ON sentitems FOR EACH ROW EXECUTE PROCEDURE update_timestamp(); Note You can find the script in docs/sql/pgsql.sql as well. 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-PGSQL(7)
All times are GMT -4. The time now is 09:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy