Definition of a regular file


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Definition of a regular file
# 1  
Old 12-05-2003
Definition of a regular file

Hi there.

reading the if entry from man, i get this:

-f file True if file exists and is a regular file.

What is exactly a regular file ?





Thanks,

--- 435 Gavea ---
# 2  
Old 12-05-2003
Hi,

A regular file contains data, it can be text or binary files...

Last edited by jsilva; 12-05-2003 at 03:41 PM..
# 3  
Old 12-05-2003
to be very precise

when you do a ls -l if the first column of the file permissions is a -, then that file is a regular file.
I dont really think that it should be a text or data file, it can be a binary file as well, or for that matter any other file, just the the first column of ls -l should be - Smilie

correct me if i m wrong

for eg
-rw-rw-r-- 1 username group 141 Nov 21 14:08 log

here the first column of -rw-rw-r-- is a -, it means it is a regular file.
# 4  
Old 12-08-2003
There are different types of files (actually, everything in unix is a file), including:

block special file
character special file
directory file
pipe or FIFO special file
regular file
symbolic link
socket

- http://www.labri.fr/Perso/~betrema/s...e97.html#types

So a regular file is one that is not a directory or a link, etc.. it's "regular" because there's nothing special about it. Smilie
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Compare the source definition file with data file

Hi How to compare the source definition file in unix with the data file . Please can you share me example if some one has done it before (3 Replies)
Discussion started by: Raj4fusion
3 Replies

2. Programming

Get struct definition

I have many headers with huge amount of structures in them, typical one looks like this: $ cat a.h struct Rec1 { int f1; int f2; }; struct Rec2 { char r1; char r2; }; struct Rec3 { int f1; float k1; float ... (6 Replies)
Discussion started by: migurus
6 Replies

3. Shell Programming and Scripting

Create a control file from Table definition

Hi Team, I need to create a control file with a pre-defined structure for a given table name. The table is in teradata. Ex: Table Name: TBL1 Table structure: create multiset table tbl1, no fallback, no before journal, no after journal, checksum = default, default mergeblockratio... (7 Replies)
Discussion started by: unankix
7 Replies

4. Shell Programming and Scripting

[solved] File type error (not a regular file)

Hi friend, i have written script as below to check the file existance. but i got error path="/k/p1100/users/jewel/Output" FILENAME=`ls -lrt $path/*HT|tail -1|cut -d "/" -f 8` if ; then echo "$FILENAME is available " chmod 755 $path/$FILENAME /usr/bin/scp... (0 Replies)
Discussion started by: Jewel
0 Replies

5. Programming

Perl: How to read from a file, do regular expression and then replace the found regular expression

Hi all, How am I read a file, find the match regular expression and overwrite to the same files. open DESTINATION_FILE, "<tmptravl.dat" or die "tmptravl.dat"; open NEW_DESTINATION_FILE, ">new_tmptravl.dat" or die "new_tmptravl.dat"; while (<DESTINATION_FILE>) { # print... (1 Reply)
Discussion started by: jessy83
1 Replies

6. UNIX for Dummies Questions & Answers

Definition of $-

Could someone please direct me to a link that gives the definitions for each of the letters from the results of the $- environment variable? It would be nice to know what shell options each of the letters represents, but I am specifically looking for the shell option for 'c' (lowercase c). Thank... (12 Replies)
Discussion started by: sszd
12 Replies

7. Shell Programming and Scripting

daemons definition

hi there, can somebody give me a definition for daemons, or example what are they !! and what the use for? i've done some research and all what i found is /etc/... or /usr/bin/... and i haven't quietly got the concept. any ideas !! Thanks. (5 Replies)
Discussion started by: new2Linux
5 Replies

8. Solaris

Shadow file definition

Hi Could someone Pls let me know how to define a shadow file, i.e what do each of the following stand for: root:SedGsw.WadR:13200:7:30:5:30:: What would the column headings be? Thnaks (1 Reply)
Discussion started by: narik007
1 Replies

9. Filesystems, Disks and Memory

File system definition

I really don't understand why we use many filesystems in one UNIX server and we mount them. In fact i don't really understand the signification of a file system. :( Thank you for help (1 Reply)
Discussion started by: fahmoun
1 Replies

10. UNIX for Dummies Questions & Answers

Printer definition file on HP

Hello, I'm looking for the definition file for printers on HP. Can I implement printers.conf like on SUN ? Thanks for your help:( (4 Replies)
Discussion started by: annececile
4 Replies
Login or Register to Ask a Question