Sponsored Content
Full Discussion: Truncate what is It?
Top Forums UNIX for Dummies Questions & Answers Truncate what is It? Post 41621 by rocker40 on Thursday 9th of October 2003 04:34:59 PM
Old 10-09-2003
Truncate what is It?

what does this command do ? as in [truncate.bi]
does this command just make sure everything in the file is executed?
or does it flush the file?
Actually this is used on a file in a progress database but I believe it is a unix command?
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

truncate wtmp

I have AIX5.1 I have been trying to learn how to truncate the /var/adm/wtmp file. I have seen several things on google actually but don't quite understand. I also searched your forums but couldn't find it. one says this ">/var/adm/wtmp Is that all I do? I have a seperate question also. I was... (1 Reply)
Discussion started by: rocker40
1 Replies

2. Shell Programming and Scripting

How to truncate as filesize?

Hello everybody it's me again. I have a procces that is writing in a 'file1' automatically but i want to truncate 'file1' to a filesize 'x' that mean if the 'file1' size is 'x' i want to delete the first lines while the last lines are being writed, that have sence? in the process are an... (1 Reply)
Discussion started by: Lestat
1 Replies

3. Shell Programming and Scripting

Truncate File contain

I have one file which first line is blank and second line has some data. $cat filename output: 30-MAY-07 I want to store 30-MAY-07 value in one variable. for that I wrote var="`head -2 filename`" It will give that result but I want to truncate the first line which is blank. plz help. (2 Replies)
Discussion started by: rinku
2 Replies

4. UNIX for Advanced & Expert Users

*** Truncate certain field ***

I have a file in which I need to truncate 15th field to have only one character like Put --> P and if i have no value in 15th field, it should be "O" (Other) would really appreciate the reponses, thnx in advance:b: (2 Replies)
Discussion started by: sannmayaz
2 Replies

5. UNIX for Dummies Questions & Answers

How can i truncate filenmes?

I am using FC6 just in case it matters, though i hope it doesn't. If i have a file or some files that i want to truncate the filename of, so that it is only a certain number of characters in length, how would i do that on the command line? Also, just to make it more interesting, say i... (11 Replies)
Discussion started by: Calum
11 Replies

6. Shell Programming and Scripting

Truncate table

Hi In unix able to connect to oracle database and create table ,when rerun ,if table exist ,truncate that table.Any idea how to do that a.sh ---- sqlplus -s datadmin/password <<EOF create table xx(col1 number, col2... ); exit; EOF I... (1 Reply)
Discussion started by: mohan705
1 Replies

7. Shell Programming and Scripting

Truncate file name to 40 characters

Hello all. I would like to make a script (or two shell scripts) that will do the following. I need the maximum file name and directory name to be 38 characters long. As well, if shortening the file name ends up making all of the files in that directory have the same name, then I would like... (9 Replies)
Discussion started by: marcozd
9 Replies

8. Shell Programming and Scripting

Truncate string variable

Hi, I want to truncate a string variable, returned in the script. In perl I used the below and it worked. BRNo=BR12345 $BR = substr($BRNo, 2, 7) How can I do it in sh. Thanks ! (8 Replies)
Discussion started by: script2010
8 Replies

9. UNIX for Advanced & Expert Users

Truncate folder path

Hello, Given below are 2 sample paths from 2 different servers: /opt/temp/PROD/Script/New/Letters /opt/Share/temp/Share1/PROD/Script/Files/New/Letters I would like to truncate the path till the folder "PROD". Please note that the field count of the folder "PROD" vaires from... (1 Reply)
Discussion started by: DawnNish
1 Replies

10. UNIX for Dummies Questions & Answers

recover the truncate file

hi All, how to recover the truncate file in unix. Thanks!:wall: (2 Replies)
Discussion started by: krbala1985
2 Replies
Xapian::WritableDatabase(3pm)				User Contributed Perl Documentation			     Xapian::WritableDatabase(3pm)

NAME
Search::Xapian::WritableDatabase - writable database object DESCRIPTION
This class represents a Xapian database for indexing. It's a subclass of Search::Xapian::Database, which is used for searching. METHODS
new <database> or new <path> <mode> Class constructor. Takes either a database object, or a path and one of DB_OPEN, DB_CREATE, DB_CREATE_OR_OPEN or DB_CREATE_OR_OVERWRITE. These are exported by Search::Xapian with the 'db' option. clone Return a clone of this class. flush Flush to disk any modifications made to the database. For efficiency reasons, when performing multiple updates to a database it is best (indeed, almost essential) to make as many modifications as memory will permit in a single pass through the database. To ensure this, Xapian batches up modifications. Flush may be called at any time to ensure that the modifications which have been made are written to disk: if the flush succeeds, all the preceding modifications will have been written to disk. If any of the modifications fail, an exception will be thrown and the database will be left in a state in which each separate addition, replacement or deletion operation has either been fully performed or not performed at all: it is then up to the application to work out which operations need to be repeated. Beware of calling flush too frequently: this will have a severe performance cost. Note that flush need not be called explicitly: it will be called automatically when the database is closed, or when a sufficient number of modifications have been made. add_document <document> Add a new document to the database. This method adds the specified document to the database, returning a newly allocated document ID. Note that this does not mean the document will immediately appear in the database; see flush() for more details. As with all database modification operations, the effect is atomic: the document will either be fully added, or the document fails to be added and an exception is thrown (possibly at a later time when flush is called or the database is closed). delete_document <doc_id> Delete a document from the database. This method removes the document with the specified document ID from the database. Note that this does not mean the document will immediately disappear from the database; see flush() for more details. As with all database modification operations, the effect is atomic: the document will either be fully removed, or the document fails to be removed and an exception is thrown (possibly at a later time when flush is called or the database is closed). delete_document_by_term <term> Delete any documents indexed by a term from the database. This method removes any documents indexed by the specified term from the database. The intended use is to allow UIDs from another system to easily be mapped to terms in Xapian, although this method probably has other uses. replace_document <doc_id> <document> eplace a given document in the database. This method replaces the document with the specified document ID. Note that this does not mean the document will immediately change in the database; see flush() for more details. As with all database modification operations, the effect is atomic: the document will either be fully replaced, or the document fails to be replaced and an exception is thrown (possibly at a later time when flush is called or the database is closed). replace_document_by_term <unique_term> <document> Replace any documents matching an unique term. This method replaces any documents indexed by the specified term with the specified document. If any documents are indexed by the term, the lowest document ID will be used for the document, otherwise a new document ID will be generated as for add_document. The intended use is to allow UIDs from another system to easily be mapped to terms in Xapian, although this method probably has other uses. Note that this does not mean the document(s) will immediately change in the database; see flush() for more details. As with all database modification operations, the effect is atomic: the document(s) will either be fully replaced, or the document(s) fail to be replaced and an exception is thrown (possibly at a later time when flush is called or the database is closed). add_spelling <word> <freqinc> Add a word to the spelling dictionary. If the word is already present, its frequency is increased. Parameters: word The word to add. freqinc How much to increase its frequency by (default 1). remove_spelling <word> <freqdec> Remove a word from the spelling dictionary. The word's frequency is decreased, and if would become zero or less then the word is removed completely. Parameters: word The word to remove. freqdec How much to decrease its frequency by (default 1). reopen Re-open the database to ensure you are using the latest revision. close Close the database. This also implies a commit() unless a transaction is in progress. SEE ALSO
Search::Xapian,Search::Xapian::Enquire,Search::Xapian::Database perl v5.14.2 2012-05-09 Xapian::WritableDatabase(3pm)
All times are GMT -4. The time now is 07:28 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy