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:-
.... 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!
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)
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)
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)
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)
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)
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)
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)
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)
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
LEARN ABOUT PHP
tempnam
TEMPNAM(3) 1 TEMPNAM(3)tempnam - Create file with unique file nameSYNOPSIS
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)