character and block files


 
Thread Tools Search this Thread
Special Forums Hardware Filesystems, Disks and Memory character and block files
# 1  
Old 07-04-2003
character and block files

Hello,

I want to write a process to catch data from my serial port, format it, and write it to a file that other processes can access just like any other file.

My problem is I don't want to just append the data to a file because of the disk space required. I would rather the data be available for other processes then just flushed.

Could I do this with an unbuffered character file? If not, any suggestions? If so, can you give me some tips on how to create it and pipe data to and from it? I have no problem accessing the serial port and formatting my data- just a hint of how to open the special file and write to it.

TIA for all your help! Smilie

PCk
# 2  
Old 07-04-2003
Special files connect to drivers. You must be opening a character special file to read your serial port.

Write the data to plain old everyday file. No one is forcing you to append. Or use a shared memory segment.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Copying files to directories based on first 6 character

guys, i did create a script but its too long, though it function the same. # cat nightlyscan.sh #!/usr/ksh deyt=`date +"%Y-%m-%d"` for i in `ls -lrt|grep $deyt|awk '{print $9}'` do cp -f $i /S1/Sophos/logger/ done # but i did not paste it all. this is the desired. (9 Replies)
Discussion started by: kenshinhimura
9 Replies

2. UNIX for Dummies Questions & Answers

Removing ^M Character from all the files in a folder.

Hi Everyone, I am new and need your help. Can anyone please help me in removing the ^M character from all the file in a folder recursively. Please provide me the code. Response will be Really appreciated. Thanks in Advance (4 Replies)
Discussion started by: Manu_Learner
4 Replies

3. UNIX for Dummies Questions & Answers

List files using { } meta character

p { margin-bottom: 0.08in; } How to match all files that end with the release number using the { } meta character in /boot. (2 Replies)
Discussion started by: farash
2 Replies

4. Shell Programming and Scripting

Use of character special files in scripts

Hello Do someone have an example of how to use an special character file in a script ? Or demonstrate in which case it may be helpful to use one ? Many thanks in advance for your time sharing your knowledge :) (2 Replies)
Discussion started by: ctsgnb
2 Replies

5. Shell Programming and Scripting

Breaking a file into three new files, character by character

I am new to shell scripting, and need a script to randomly distribute each character from a file into one of three new files. I also need each character to maintain it's position from the original file in the new file (such that if a character is written to File 1, Files 2 and 3 have spaces... (10 Replies)
Discussion started by: foxcastle
10 Replies

6. Shell Programming and Scripting

How do I remove everything after a certain character in text files?

I have a text file with a few thousand lines in the format: abcdef*ghijk*lmno pqrs*tuv wx*y*z etc. What I want to do is, get rid of everything after the SECOND asterik (the *) in each line (including the asterik). So for the example above, it would look like this after the editing: ... (11 Replies)
Discussion started by: guitarscn
11 Replies

7. Shell Programming and Scripting

need to find last character in each line in all files

Hi, I need to read each line in all files .If last character in each line is not ;(semicolon) then i need to append next line also.Here each line may consists of multiple semicolons(;).but i need to read only last character.I need to achieve this using shell script.And i need to remove tht last... (7 Replies)
Discussion started by: dbsurf
7 Replies

8. UNIX for Dummies Questions & Answers

Email files with files - wild character

Dear friends: I have these data files: fileaa fileab fileac filead I want to email these file to someone. How can I email EACH SINGLE FILE with a wild card character? mail john@mail.com<fileaa mail john@mail.com<fileab ...............................ac... (4 Replies)
Discussion started by: bobo
4 Replies

9. UNIX for Dummies Questions & Answers

Find files which contain a null character

Hi, I would like to use grep to find files which contain NULL characters. I'm not sure how to represent the null character in the grep statement. Could anyone help please? Thanks! Helen :confused: (5 Replies)
Discussion started by: Bab00shka
5 Replies

10. Programming

files and wild character

Hai, Can any one give idea how to display files by wildcharacter in c. If there is any function available it will very usefull for me. (4 Replies)
Discussion started by: arunkumar_mca
4 Replies
Login or Register to Ask a Question