01-05-2012
You have options that range from opening directories and reading their contents manually ( opendir, readdir), searching for the files (and doing it recursively) to using more specific functions like scandir, available in many systems, but with slightly different interfaces.
This User Gave Thanks to pflynn For This Post:
10 More Discussions You Might Find Interesting
1. Programming
How to get free disk space size in C/C++ program( Solaris system)?
Is there any standard function or system function? Just like "df" or
"getdfree" in Linux. (4 Replies)
Discussion started by: yidu
4 Replies
2. Shell Programming and Scripting
I have my Mac OS X program executing a shell script (a script that copies files to a drive). I want to make it so that the shell script automatically kills itself if it finds that the host .app is not running OR kill itself if the drive that it is copying files to has been unmounted. Right now what... (2 Replies)
Discussion started by: pcwiz
2 Replies
3. Homework & Coursework Questions
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
Write a C program to search the current directory for all pipes.
1. It will print the pipe... (2 Replies)
Discussion started by: natwickley
2 Replies
4. Programming
Hello,
Can some one help me by writing me the script of a program that does the following simple functions on a Linux Mint:
1. it runs in the background all the time, doing nothing except of checking if there is any external device mounted.
2. when the device is detected, it copies files... (1 Reply)
Discussion started by: Black_Ardilla
1 Replies
5. Shell Programming and Scripting
Hi ,
I have been trying to write a perl script to do this job. But i am not able to achieve the desired result. Below is my code.
my $current_value=12345;
my @users=("bob","ben","tom","harry");
open DBLIST,"<","/var/tmp/DBinfo";
my @input = <DBLIST>;
foreach (@users)
{
my... (11 Replies)
Discussion started by: chidori
11 Replies
6. Shell Programming and Scripting
Hi all,
I have a big file (n.txt) with following pattern:
ATOM 1 N SER A 1 122.392 152.261 138.190 1.00 0.00 N
ATOM 2 CA SER A 1 122.726 151.241 139.183 1.00 0.00 C
TER
ENDMDL
ATOM 1 N SER A 1 114.207 142.287 135.439 1.00 0.00 ... (3 Replies)
Discussion started by: bioinfo
3 Replies
7. Programming
Hi,
I am not a C programmer. The only C exposure I have is reading and completing the exercises from the C (ANSI C ) Programming Language book:o
At the moment, I am using the UNIX strings command to extract information for a binary file and grepping for a particular string and the value... (3 Replies)
Discussion started by: newbie_01
3 Replies
8. Shell Programming and Scripting
I have two files:
file 1:
hello.com neo.com,japan.com,example.com
news.net xyz.com, telecom.net, highlands.net, software.com
example2.com earth.net, abc.gov.uk
file 2:
neo.com
example.com
abc.gov.uk
file 2 are the search keys to search in file 1 if any of the search... (7 Replies)
Discussion started by: csim_mohan
7 Replies
9. Shell Programming and Scripting
Hi guys,
I have a text file named file1.txt that is formatted like this:
001 , ID , 20000
002 , Name , Brandon
003 , Phone_Number , 616-234-1999
004 , SSNumber , 234-23-234
005 , Model , Toyota
007 , Engine ,V8
008 , GPS , OFF
and I have file2.txt formatted like this:
... (2 Replies)
Discussion started by: An0mander
2 Replies
10. Shell Programming and Scripting
Hi All,
Your help on the below requirement is highly appreciated.
I am building a program which should pick the file from a source directory and place them into target directory. While selecting the file in source it should look for some pattern in the file name.
Ex:
File Name 1:... (10 Replies)
Discussion started by: bharath561989
10 Replies
HP(4) Kernel Interfaces Manual HP(4)
NAME
hp - RH-11/RP04, RP05, RP06 moving-head disk
DESCRIPTION
The octal representation of the minor device number is encoded idp, where i is an interleave flag, d is a physical drive number, and p is a
pseudodrive (subsection) within a physical unit. If i is 0, the origins and sizes of the pseudodisks on each drive, counted in cylinders
of 418 512-byte blocks, are:
disk start length
0 0 23
1 23 21
2 0 0
3 0 0
4 44 386
5 430 385
6 44 367
7 44 771
If i is 1, the minor device consists of the specified pseudodisk on drives numbered 0 through the designated drive number. Successively
numbered blocks are distributed across the drives in rotation.
Systems distributed for these devices use disk 0 for the root, disk 1 for swapping, and disk 4 (RP04/5) or disk 7 (RP06) for a mounted user
file system.
The block files access the disk via the system's normal buffering mechanism and may be read and written without regard to physical disk
records.
A `raw' interface provides for direct transmission between the disk and the user's read or write buffer. A single read or write call
results in exactly one I/O operation and therefore raw I/O is considerably more efficient when many words are transmitted. The names of
the raw files conventionally begin with an extra `r.' In raw I/O the buffer must begin on a word boundary, and raw I/O to an interleaved
device is likely to have disappointing results.
FILES
/dev/rp?, /dev/rrp?
SEE ALSO
rp(4)
BUGS
In raw I/O read and write(2) truncate file offsets to 512-byte block boundaries, and write scribbles on the tail of incomplete blocks.
Thus, in programs that are likely to access raw devices, read, write and lseek(2) should always deal in 512-byte multiples.
Raw device drivers don't work on interleaved devices.
HP(4)