Unexplained text in data files


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Unexplained text in data files
# 8  
Old 08-12-2015
Of course it is, which is why you examined it in detail.

Anything used to create or modify the files is relevant.
# 9  
Old 08-12-2015
I examined it in detail to ensure there was no reference to the files being compromised. The code does not read or write to any of the files being altered. And in some instances what is being written to the data files is not pieces of other files but sometimes just lists of files from a directory. The code does not use anything that would cause that so something else is going on.
# 10  
Old 08-12-2015
Contention issue?
# 11  
Old 08-12-2015
Quote:
Originally Posted by SRoberts
I examined it in detail to ensure there was no reference to the files being compromised.
How exactly are these files being written to, by what?

There doesn't need to be a reference to their names, necessarily. Redirection from outside can cause them to write to it without having to tell it. This is my concern particularly since this looks like an unintended result of redirecting stderr into stdout.

Last edited by Corona688; 08-12-2015 at 01:06 PM..
# 12  
Old 08-12-2015
These data files are created by another program executable and are stored in a different directory. The thing I find weird is that some are 3 years old and just last week they got text added to them.

Excuse my ignorance as I am far from an expert in this field. What do you mean by redirection from outside can cause them to write to it without having to tell it?
# 13  
Old 08-12-2015
Quote:
Originally Posted by SRoberts
So the problem is occurring on a local system where I have data files that are ok at one point then at some point in the future (weeks, months) text from other files occurs at various locations in the data files. There does not seems to be a consistent location within the data files. The data files themselves are not do not seem to be altered based on the timestamp but the text is in there as the files are not usable and I have to recreate them. I thought maybe there was some error in some code I had written that caused this but I have gone through and everything seems legit so I am at a loss for what is causing it.
If the timestamps have not been altered when data inside the file has changed, either
  • the filesystem is mounted with file time updates disabled,
  • something is scribbling on the raw disk on which the file system containing your files is mounted,
  • you have a filesystem where two or more systems think they are THE server for the filesystem mounted on that slice,
  • you have a hardware problem (disk, disk controller, memory, etc.), or
  • an OS filesystem bug.
With the data you have provided, I don't see how we can narrow that down much.
This User Gave Thanks to Don Cragun For This Post:
# 14  
Old 08-12-2015
Quote:
Originally Posted by SRoberts
These data files are created by another program executable and are stored in a different directory. The thing I find weird is that some are 3 years old and just last week they got text added to them.

Excuse my ignorance as I am far from an expert in this field. What do you mean by redirection from outside can cause them to write to it without having to tell it?
Running a program like programname >datafile 2>&1 makes programname write to datafile even though the program doesn't know the file name -- it doesn't even open the file itself.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

In PErl script: need to read the data one file and generate multiple files based on the data

We have the data looks like below in a log file. I want to generat files based on the string between two hash(#) symbol like below Source: #ext1#test1.tale2 drop #ext1#test11.tale21 drop #ext1#test123.tale21 drop #ext2#test1.tale21 drop #ext2#test12.tale21 drop #ext3#test11.tale21 drop... (5 Replies)
Discussion started by: Sanjeev G
5 Replies

2. Shell Programming and Scripting

Read multiple text files and copy data to csv

hi i need to extract lines from multiple files to a csv file. for example, i have these 3 files file1.txt date:29dec1980 caller:91245824255 called:8127766 file2.txt date:11apr2014 caller:9155584558 called:8115478 file3.txt date:25jun2015 caller:445225552 called:8117485 (30 Replies)
Discussion started by: lp.descamps
30 Replies

3. Shell Programming and Scripting

Unexplained result of 'find' command

Given this bit of script: retprd=$1 find ${extrnllogdir} -name "*.log" -mtime +$retprd -exec ls -l {} \; >> $logfile produces this (with 'set -x') ++ find /xfers/oracle/dw/data -name '*.log' -mtime +60 -exec ls -l '{}' ';' find: /xfers/oracle/dw/data/cron: Permission denied Where is he... (5 Replies)
Discussion started by: edstevens
5 Replies

4. Shell Programming and Scripting

Merge and Sort tabular data from different text files

I have 42 text files; each containing up to 34 lines with following structure; file1 H-01 23 H-03 5 H-05 9 H-02 14 . . file2 H-01 17 H-02 43 H-04 7 H-05 8 H-03 7 . . file3 (6 Replies)
Discussion started by: Syeda Sumayya
6 Replies

5. Shell Programming and Scripting

Combine data from two files base on uniq data

File 1 ID Name Po1 Po2 DD134 DD134_4A_1 NN-1 L_0_1 DD134 DD134_4B_1 NN-2 L_1_1 DD134 DD134_4C_1 NN-3 L_2_1 DD142 DD142_4A_1 NN-1 L_0_1 DD142 DD142_4B_1 NN-2 L_1_1 DD142 DD142_4C_1 NN-3 L_2_1 DD142 DD142_3A_1 NN-41 L_3_1 DD142 DD142_3A_1 NN-42 L_3_2 File 2 ( Combination of... (1 Reply)
Discussion started by: pareshkp
1 Replies

6. Shell Programming and Scripting

Converting text files to xls through awk script for specific data format

Dear Friends, I am in urgent need for awk/sed/sh script for converting a specific data format (.txt) to .xls. The input is as follows: >gi|1234|ref| Query = 1 - 65, Target = 1677 - 1733 Score = 8.38, E = 0.6529, P = 0.0001513, GC = 46 fd sdfsdfsdfsdf fsdfdsfdfdfdfdfdf... (6 Replies)
Discussion started by: Amit1
6 Replies

7. Shell Programming and Scripting

Complex data sorting in excel files or text files

Dear all, I have a complex data file shown below,,,,, A_ABCD_13208 0 0 4.16735 141044 902449 1293900 168919 C_ABCD_13208 0 0 4.16735 141044 902449 1293900 168919 A_ABCDEF715 52410.9 18598.2 10611 10754.7 122535 252426 36631.4 C_DBCDI_1353 0... (19 Replies)
Discussion started by: AAWT
19 Replies

8. Programming

Unexplained segmentation fault

Hi, The following code reads 20 characters from one file and writes them (appends them) to the other file. The code works in Turbo C++ on windows but it shows segmentation fault on Linux. I am using Ubuntu 10.10 and gcc compiler. Please tell me where I was wrong. #include<stdio.h> void... (6 Replies)
Discussion started by: haritha.gorijav
6 Replies

9. Shell Programming and Scripting

Need help in writing a script to create a new text file with specific data from existing two files

Hi, I have two text files. Need to create a third text file extracting specific data from first two existing files.. Text File 1: Format contains: SQL*Loader: Release 10.2.0.1.0 - Production on Wed Aug 4 21:06:34 2010 some text ............so on...and somwhere text like: Record 1:... (1 Reply)
Discussion started by: shashi143ibm
1 Replies

10. Shell Programming and Scripting

Extraction of data from multiple text files, and creation of a chart

Hello dear friends, My problem as explained below seems really basic. Fact is that I'm totally new to programming, and have only a week to produce a script ( CShell or Perl ? ) to perform this action. While searching on the forums, I found a command that could help me, but I don't know... (2 Replies)
Discussion started by: ackheron
2 Replies
Login or Register to Ask a Question