You don't state the OS version, so I don't know what tools you may already have to do this for you, and it depends what you want the file for.
There is a way in C that you open a new file, skipping to a huge offset then writing a single character before closing it. That might do the trick but it doesn't initially consume disk space and won't worry you for IO load. That may not be good for what you are trying to test. Additionally, if you restore it or copy it, the target file will be the full size, so that might mean that the filesystem does not restore properly if you suddenly fill it during a restore.
A good way can be to take a tar of a good chunk of disk (any files will do) then append it to itself several times, repeating until you get the desired size. Something like:-
Repeat the last two lines as needed to get a big enough file. If you need to trim it down again, you could perhaps:-
I've made it compress the file (you may prefer gzip) so that it is a true performance test, i.e. it can't be further compressed during transmission etc.
hi all i want a script to FTP a file and should generate a quality checksum file
means when I FTP a file from one server to another server it should generate a QC file which should contain timestamp,no.of records in that file
Thanks in advance
saikumar (3 Replies)
Hi All,
I am trying to generate a weekly HTML report using LINUX Scripting. This will have record counts of some files. (like below)
touch path/filename.html
echo "Weekly Summary Report for Business Date : $P_BUS_DT">path/filename.html
export A1=`cat path/filename1.txt |wc -l`
echo "A1... (6 Replies)
Hi All,
I am trying to generate a file through a LINUX scripting as shown below
export field1=`cat dir/filename1.txt |wc -l`
echo "field1 : $field1 >>dir/WeeklySummaryReport.txt
export field2=`cat dir/filename2.txt |wc -l`
echo "field2 : $field2 >>dir/WeeklySummaryReport.txt
While... (5 Replies)
Hi All,
I have a requirement where I need to go to a directory, list all the files that start with person* (for eg) & read the most recent file from the list of files.
While browsing through the forum, i found that the command ls -t will list the files. I am trying to generate the output... (1 Reply)
Hi,We have an interface which extracts data from database tables, spool the records into text files, and copy those files using SFTP to a windows server location. The target system loads these files into its database using some DTS packages in SQL Server.
This interface of exporting text files... (13 Replies)
cannot generate .ko file on my linux, although it can generate module.symvers.
But when I copy .c file and Makefile to another linux computer, there's no problem.
The strange thing is: make is successfuly executed, and returned 0;
make output:
make -C /lib/modules/2.6.18-92.el5xen/build ... (4 Replies)
Dear Members,
I have a table in Oracle DB and one of its column name is INFO which has data in text format which we need to fetch in a script and create an xml file of a new table from the input.
The contents of a single cell of INFO column is like:
Area:app - aam
Clean Up Criteria:... (0 Replies)
I use red hat linux es 5
I use startx to start the x-win desktop.
But when I use vritual manager .
The display application is too large so the bottom
part for the application cannot show out.
I cannot scroll down to get the display of bottm part .
So, I do not know what button display at the... (0 Replies)
Hi Scripting Gurus,
I am trying to parse a csv file and generate a new output file.
The input file will be a variable length in turns of rows and columns.
output file will have 8 columns. we have three columns from the header for each set.
just to give little bit more clarification each row... (15 Replies)
Hello,
I have a excel file which has almost ten columns on the shared drive. I have to write a shell script to ftp that daily to unix server and then extract some columns from there and generate oracle standard text file. The columns should be in proper order and aligned properly, otherwise... (1 Reply)