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
tmpnam(3C)						   Standard C Library Functions 						tmpnam(3C)

NAME
tmpnam, tmpnam_r, tempnam - create a name for a temporary file SYNOPSIS
#include <stdio.h> char *tmpnam(char *s); char *tmpnam_r(char *s); char *tempnam(const char *dir, const char *pfx); DESCRIPTION
These functions generate file names that can be used safely for a temporary file. tmpnam() The tmpnam() function always generates a file name using the path prefix defined as P_tmpdir in the <stdio.h> header. On Solaris systems, the default value for P_tmpdir is /var/tmp. If s is NULL, tmpnam() leaves its result in a thread-specific data area and returns a pointer to that area. The next call to tmpnam() by the same thread will destroy the contents of the area. If s is not NULL, it is assumed to be the address of an array of at least L_tmpnam bytes, where L_tmpnam is a constant defined through inclusion of <stdio.h>. The tmpnam() function places its result in that array and returns s. tmpnam_r() The tmpnam_r() function has the same functionality as tmpnam() except that if s is a null pointer, the function returns NULL. tempnam() The tempnam() function allows the user to control the choice of a directory. The argument dir points to the name of the directory in which the file is to be created. If dir is NULL or points to a string that is not a name for an appropriate directory, the path prefix defined as P_tmpdir in the <stdio.h> header is used. If that directory is not accessible, /tmp is used. If, however, the TMPDIR environment variable is set in the user's environment, its value is used as the temporary-file directory. Many applications prefer that temporary files have certain initial character sequences in their names. The pfx argument may be NULL or point to a string of up to five characters to be used as the initial characters of the temporary-file name. Upon successful completion, tempnam() uses malloc(3C) to allocate space for a string, puts the generated pathname in that space, and returns a pointer to it. The pointer is suitable for use in a subsequent call to free(). If tempnam() cannot return the expected result for any reason (for example, malloc() failed), or if none of the above-mentioned attempts to find an appropriate directory was successful, a null pointer is returned and errno is set to indicate the error. ERRORS
The tempnam() function will fail if: ENOMEM Insufficient storage space is available. USAGE
These functions generate a different file name each time they are called. Files created using these functions and either fopen(3C) or creat(2) are temporary only in the sense that they reside in a directory intended for temporary use, and their names are unique. It is the user's responsibility to remove the file when its use is ended. If called more than TMP_MAX (defined in <stdio.h>) times in a single process, these functions start recycling previously used names. Between the time a file name is created and the file is opened, it is possible for some other process to create a file with the same name. This can never happen if that other process is using these functions or mktemp(3C) and the file names are chosen to render duplication by other means unlikely. The tmpnam() function is safe to use in multithreaded applications because it employs thread-specific data if it is passed a NULL pointer. However, its use is discouraged. The tempnam() function is safe in multithreaded applications and should be used instead. When compiling multithreaded applications, the _REENTRANT flag must be defined on the compile line. This flag should be used only with multithreaded applications. ATTRIBUTES
See attributes(5) for descriptions of the following attributes: +-----------------------------+-------------------------------------+ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | +-----------------------------+-------------------------------------+ |Interface Stability |tmpnam() and tempnam() are Standard. | +-----------------------------+-------------------------------------+ |MT-Level |Safe | +-----------------------------+-------------------------------------+ SEE ALSO
creat(2), unlink(2), fopen(3C), free(3C), malloc(3C), mktemp(3C), mkstemp(3C), tmpfile(3C), attributes(5), standards(5) SunOS 5.10 18 May 2004 tmpnam(3C)
All times are GMT -4. The time now is 11:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy