Sponsored Content
Top Forums UNIX for Dummies Questions & Answers how to retrieve original contents of a modified file (modified using vi) Post 302119768 by porter on Thursday 31st of May 2007 08:50:37 PM
Old 05-31-2007
If it was in cvs...

Code:
rm file-with-bad-change
cvs update

Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How do I get the last modified date of a file?

I am trying to load a group of files and their last dates modified into a text file that will in turn be used with SQL*Loader to load these files into Oracle. I am using a *.ksh script. I am getting the name of the file in by using the following: for file_ext in 'cat loaddir.ext'; do find... (2 Replies)
Discussion started by: akpopa
2 Replies

2. Programming

File last modified

I cannot read the last moment the file was modified - it returns "Most recent access" instead: code: </td> <th><?FILE *fatr=fopen(iindname.c_str(), "r"); if(fatr){ struct stat statbuf; fstat(fileno(fatr), &statbuf); fclose(fatr); ?> ... (4 Replies)
Discussion started by: szzz
4 Replies

3. Shell Programming and Scripting

Check if file modified

Hi, I have a monitoring script that I run, and I would like to automate checking if specific parameter file is modified during the last day or two. How do I do that? (1 Reply)
Discussion started by: nimo
1 Replies

4. UNIX for Dummies Questions & Answers

who modified my file!!

Hi EVERYONE!!... Just a simple (yet critical from my perspective) doubt... I would like to know who had edited my file.. when I use ls -l command, I see my ID.. but when I edit using some other ID, I had expected that ID to be shown.. but still ls -l shows my ID only.. So, is there any... (4 Replies)
Discussion started by: mohanprabu
4 Replies

5. Shell Programming and Scripting

How to get a filename modified by attaching modified timestamp

Hi, I want to modify a filename in AIX by attaching the last modified timestamp. I want the timestamp completely in numerical format (eg:200905081210. yr-2009, mnth - 05, date -08, hr - 12, mins - 10). For example if the filename is a.log and it was modified on April 6th 2008 at 21.00. I... (16 Replies)
Discussion started by: Ruks
16 Replies

6. Shell Programming and Scripting

How long since file has been modified

how can I find out if a file has been modified less than 24hrs ago (3 Replies)
Discussion started by: BeefStu
3 Replies

7. Shell Programming and Scripting

How to find a file modified more than once

Hi All, How to find a file modified more than once.... Thanks in advance (2 Replies)
Discussion started by: kmsekhar
2 Replies

8. UNIX for Dummies Questions & Answers

The original AF counter that has yet to be modified.

Hi guys... This was my original attempt at the AF Frequency Counter for the AudioScope.sh project... #!/bin/bash # Set the startup values... data="?" freq=0 number="" subscript=0 waveform=0 # An initial screen... clear printf "\nA simple 50 Hz to 3500 Hz audio frequency... (2 Replies)
Discussion started by: wisecracker
2 Replies

9. UNIX for Advanced & Expert Users

Who has modified a file - History?

Hello, I'd want to know who and what time has modified a file in unix (history). I'd like to know all people who has modified a file. Thanks in advance (6 Replies)
Discussion started by: nurinolo
6 Replies

10. UNIX for Dummies Questions & Answers

Is original file modified when pigz is interrupted?

I had to stop a pigz (parallel gzip) compression before it completed. Is the original uncompressed file changed/corrupted? I was under the impression that the original file is not changed during compression, though it is deleted if the compression is successful. (1 Reply)
Discussion started by: colin123
1 Replies
DtEditorGetContents(library call)										 DtEditorGetContents(library call)

NAME
DtEditorGetContents -- retrieve the contents of a DtEditor widget SYNOPSIS
#include <Dt/Editor.h> DtEditorErrorCode DtEditorGetContents( Widget widget, DtEditorContentRec *data, Boolean hardCarriageReturns, Boolean markContentsAsSaved); DESCRIPTION
The DtEditorGetContents function retrieves the entire contents of a DtEditor widget as a string, wide character string or sized buffer of data. The data is transferred from the DtEditor widget using a DtEditorContentRec, which indicates the type of data being transferred along with the actual data. If desired, any soft line feeds (word wraps) can be replaced with <newline>s. The DtEditor widget tracks whether its contents have changed since they were last saved or retrieved. Setting the markContentsAsSaved argument to True retrieves a copy of the data without affecting whether DtEditorCheckForUnsavedChanges(3) reports that there are unsaved changes. This is useful if the application needs a temporary copy of the contents. The widget argument specifies the DtEditor widget ID. The data argument is a pointer to a data structure to receive the contents of widget. The hardCarriageReturns argument, if set to True, indicates that the DtEditor widget should replace any soft line feeds (word wraps) with <newline>s when saving the data. When hardCarriageReturns is set to False, any line wrapped because it reaches the right edge of the win- dow is saved as one complete line. The markContentsAsSaved argument, if set to True, causes the DtEditor widget to mark that all changes made to date have been saved. When markContentsAsSaved is set to False, the DtEditor widget does not change its status regarding unsaved changes. For a complete definition of the DtEditor widget and its associated resources, see DtEditor(3). For a complete definition of DtEditorContentRec, see Dt/Editor.h - DtEditor(5). RETURN VALUE
Upon successful completion, the DtEditorGetContents function returns DtEDITOR_NO_ERRORS; otherwise, it returns DtEDITOR_INVALID_TYPE if the Type field is not recognized. EXAMPLES
The following code segment retrieves the contents of a DtEditor widget, marking that all changes to date have been saved. Widget editor; DtEditorContentRec cr; DtEditorErrorCode status; Boolean markContentsAsSaved = True; cr.type = DtEDITOR_TEXT; status = DtEditorGetContents(editor, &cr, False, markContentsAsSaved); if (status == DtEDITOR_NO_ERRORS) printf("The contents are: %s ", cr.value.string); else printf("Unable to retrieve contents of the widget "); APPLICATION USAGE
To write the data directly to a file, the application should use DtEditorSaveContentsToFile(3). SEE ALSO
Dt/Editor.h - DtEditor(5), DtEditor(3), DtEditorAppend(3), DtEditorAppendFromFile(3), DtEditorCheckForUnsavedChanges(3), DtEditorInsert(3), DtEditorInsertFromFile(3), DtEditorReplace(3), DtEditorReplaceFromFile(3), DtEditorSaveContentsToFile(3), DtEditorSetContents(3), DtEdi- torSetContentsFromFile(3). DtEditorGetContents(library call)
All times are GMT -4. The time now is 09:22 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy