Sponsored Content
Operating Systems Solaris Editor for working with large files Post 302887671 by rbatte1 on Monday 10th of February 2014 07:19:59 AM
Old 02-10-2014
What messages do you get from vi?

Is it a space issue?

If so, then this is because the temporary file it creates has to reside somewhere and the default is /var/tmp If that filesystem is not big enough then it will fail to open the file as you expect. You can re-direct the temporary file by editing your .exrc and including the following directive:-
Code:
set dir=/test/temp

.... or to wherever you have sufficient free space.

Of course, I've never tried to open such a huge file as a few hundred Mb, so this is not guaranteed to work!



I hope that it helps though.


Robin
Liverpool/Blackburn
UK
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Sed working on lines of small length and not large length

Hi , I have a peculiar case, where my sed command is working on a file which contains lines of small length. sed "s/XYZ:1/XYZ:3/g" abc.txt > xyz.txt when abc.txt contains lines of small length(currently around 80 chars) , this sed command is working fine. when abc.txt contains lines of... (3 Replies)
Discussion started by: thanuman
3 Replies

2. UNIX for Advanced & Expert Users

Planning on writing a Guide to Working with Large Datasets

In a recent research experiment I was handling, I faced this task of managing huge amounts of data to the order of Terabytes and with the help of many people here, I managed to learn quite a lot of things in the whole process. I am sure that many people will keep facing these situations quite often... (2 Replies)
Discussion started by: Legend986
2 Replies

3. UNIX for Dummies Questions & Answers

Files search in vi editor

Hi All, Apologise if I am in the wrong forum, I am trying to view all files one by one in the vi editor that contain a pattern. This command work but not sure where to pipe it to use vi editor find . -name "pattern" -print | xargs -ltr tnx in advance (1 Reply)
Discussion started by: lingosa
1 Replies

4. UNIX for Dummies Questions & Answers

working with vi editor

Hi there, I am unable to find solution to the following question. 1) How do you copy 10 lines starting from the current and paste at the end of file? 2) How do you delete five lines starting from the current and four lines above? 3) What is the command to remove all space... (1 Reply)
Discussion started by: grc
1 Replies

5. Shell Programming and Scripting

Divide large data files into smaller files

Hello everyone! I have 2 types of files in the following format: 1) *.fa >1234 ...some text... >2345 ...some text... >3456 ...some text... . . . . 2) *.info >1234 (7 Replies)
Discussion started by: ad23
7 Replies

6. Solaris

How to safely copy full filesystems with large files (10Gb files)

Hello everyone. Need some help copying a filesystem. The situation is this: I have an oracle DB mounted on /u01 and need to copy it to /u02. /u01 is 500 Gb and /u02 is 300 Gb. The size used on /u01 is 187 Gb. This is running on solaris 9 and both filesystems are UFS. I have tried to do it using:... (14 Replies)
Discussion started by: dragonov7
14 Replies

7. Programming

Working with extremely large numbers in C

Hi All, I am just curious, not programming anything of my own. I know there are libraries like gmp which does all such things. But I really need to know HOW they do all such things i.e. working with extremely large unimaginable numbers which are beyond the integer limit. They can do add,... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies

8. Shell Programming and Scripting

copying the files in vi editor

Hi, For a particular file i used Vi editor to view the content and i have to copy the same , But in the files if have 1000 lines and i have to copy the file contents from 700th to 900th lines But while copying i'm dragging the mouse from top to bottom but i supposed to copy the lines... (8 Replies)
Discussion started by: thelakbe
8 Replies

9. Shell Programming and Scripting

sed and awk not working on a large record file

Hi All, I have a very large single record file. abc;date||bcd;efg|......... pqr;stu||record_count;date when i do wc -l on this file it gives me "0" records, coz of missing line feed. my problem is there is an extra pipe that is coming at the end of this record like... (6 Replies)
Discussion started by: Gurkamal83
6 Replies

10. Solaris

Vi editor not working

Hi All, When i try to use vi editor to view content of a file i get error "Terminal too wide" I try to use the following stty command though i dont know the purpose of it ( as it was said in some oracle forum ) but still the same error returns. "stty columns 120" Could you explain... (5 Replies)
Discussion started by: Maddy123
5 Replies
TEMPNAM(3)								 1								TEMPNAM(3)

tempnam - Create file with unique file name

SYNOPSIS
string tempnam (string $dir, string $prefix) DESCRIPTION
Creates a file with a unique filename, with access permission set to 0600, in the specified directory. If the directory does not exist or is not writable, tempnam(3) may generate a file in the system's temporary directory, and return the full path to that file, including its name. PARAMETERS
o $dir - The directory where the temporary filename will be created. o $prefix - The prefix of the generated temporary filename. Note Windows uses only the first three characters of prefix. RETURN VALUES
Returns the new temporary filename (with path), or FALSE on failure. CHANGELOG
+--------+---------------------------------------------------+ |Version | | | | | | | Description | | | | +--------+---------------------------------------------------+ | 4.0.3 | | | | | | | This function's behavior changed in 4.0.3. The | | | temporary file is also created to avoid a race | | | condition where the file might appear in the | | | filesystem between the time the string was gener- | | | ated and before the script gets around to creat- | | | ing the file. Note, that you need to remove the | | | file in case you need it no more, it is not done | | | automatically. | | | | +--------+---------------------------------------------------+ EXAMPLES
Example #1 tempnam(3) example <?php $tmpfname = tempnam("/tmp", "FOO"); $handle = fopen($tmpfname, "w"); fwrite($handle, "writing to tempfile"); fclose($handle); // do here something unlink($tmpfname); ?> NOTES
Note If PHP cannot create a file in the specified $dir parameter, it falls back on the system default. On NTFS this also happens if the specified $dir contains more than 65534 files. SEE ALSO
tmpfile(3), sys_get_temp_dir(3), unlink(3). PHP Documentation Group TEMPNAM(3)
All times are GMT -4. The time now is 07:25 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy