Sponsored Content
Operating Systems Solaris Why files get created with srwxrwxrwt under /dev/? Post 302955215 by YShivak on Tuesday 15th of September 2015 11:57:36 AM
Old 09-15-2015
My intention is to create a text file under /dev directory.
But whenever I try creating it through a program or even from the command line as mentioned earlier they get created as 'socket' files. Some weird process is doing this.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

mv files to /dev/null

im having trouble with moving files in a directory into /dev/null for file in $HOME/.trashcan/ do mv $file /dev/null done the error msg i get is: mv: /dev/null: not a directory. does anyone know how to fix this? thanks primal (16 Replies)
Discussion started by: primal
16 Replies

2. UNIX for Dummies Questions & Answers

Two Files Created For Every One?

Hello, my linux box is, for some reason, creating two files when I creat one. For example, if I create a file via the VI editor called TestFile, the box will create: TestFile TestFile~ Does anyone have any ideas as to why I'm getting that second file with the ~ at the end of it? ... (1 Reply)
Discussion started by: Atama
1 Replies

3. UNIX for Dummies Questions & Answers

files created within last 10 mins

Any simple 1 liners to check a directory to see if a file was created within the last 10 mins? (5 Replies)
Discussion started by: frustrated1
5 Replies

4. UNIX for Dummies Questions & Answers

Files created by particular user

How i get the all the files created by particular user?? (2 Replies)
Discussion started by: Anshu
2 Replies

5. Solaris

What is /dev/tty /dev/null and /dev/console

Hi, Anyone can help My solaris 8 system has the following /dev/null , /dev/tty and /dev/console All permission are lrwxrwxrwx Can this be change to a non-world write ?? any impact ?? (12 Replies)
Discussion started by: civic2005
12 Replies

6. Shell Programming and Scripting

Count todays created files and old files

Hello experts, I used following approach to get listing of all files of remote server. Now I have remote server file information on same server. I am getting listing in the output.txt I want to count today's created files and old files. I want to compare the numbers... (11 Replies)
Discussion started by: dipeshvshah
11 Replies

7. Red Hat

Info on /dev/dm files

Hi, I was looking at my /dev directory and found some files of the pattern dm?. I searched on google and found that it is a device manager file for LVM. But nothing but that. Can someone give me some info on when these files are created and if we can use this as instead of... (7 Replies)
Discussion started by: prithvirao17
7 Replies

8. Solaris

Lun remove, stuck in /dev/dsk and /dev/rdsk

So, we removed a LUN from the SAN and the system is refusing to remove the references to it in the /dev folder. I've done the following: devfsadm -Cv powermt -q luxadm -e offline <drive path> luxadm probe All those commands failed to remove the path. The drive stills shows up as <drive... (13 Replies)
Discussion started by: DustinT
13 Replies

9. Shell Programming and Scripting

Listing the file name and no of records in each files for the files created on a specific day

Hi, I want to display the file names and the record count for the files in the 2nd column for the files created today. i have written the below command which is listing the file names. but while piping the above command to the wc -l command its not working for me. ls -l... (5 Replies)
Discussion started by: Showdown
5 Replies

10. Shell Programming and Scripting

Automating partitioning setup of /dev/sda on /dev/sdc

Objective: To recreate the partitioning setup of /dev/sda on /dev/sdc How would I parse the below information and initialize variables (an array?) that can be used to build sgdisk commands in a script, regardless of the number of partitions? Something along the lines of: sgdisk -n... (12 Replies)
Discussion started by: RogerBaran
12 Replies
FSTAT(1)						    BSD General Commands Manual 						  FSTAT(1)

NAME
fstat -- file status SYNOPSIS
fstat [-fnv] [-M core] [-N system] [-p pid] [-u user] [filename...] DESCRIPTION
Fstat identifies open files. A file is considered open by a process if it was explicitly opened, is the working directory, root directory, active pure text, or kernel trace file for that process. If no options are specified, fstat reports on all open files in the system. Options: -f Restrict examination to files open in the same filesystems as the named file arguments, or to the filesystem containing the current directory if there are no additional filename arguments. For example, to find all files open in the filesystem where the directory /usr/src resides, type ``fstat -f /usr/src''. -M Extract values associated with the name list from the specified core instead of the default /dev/kmem. -N Extract the name list from the specified system instead of the default /vmunix. -n Numerical format. Print the device number (maj,min) of the filesystem the file resides in rather than the mount point name; for spe- cial files, print the device number that the special device refers to rather than the filename in /dev; and print the mode of the file in octal instead of symbolic form. -p Report all files open by the specified process. -u Report all files open by the specified user. -v Verbose mode. Print error messages upon failures to locate particular system data structures rather than silently ignoring them. Most of these data structures are dynamically created or deleted and it is possible for them to disappear while fstat is running. This is normal and unavoidable since the rest of the system is running while fstat itself is running. filename ... Restrict reports to the specified files. The following fields are printed: USER The username of the owner of the process (effective uid). CMD The command name of the process. PID The process id. FD The file number in the per-process open file table or one of the following special names: text - pure text inode wd - current working directory root - root inode tr - kernel trace file If the file number is followed by an asterisk (``*''), the file is not an inode, but rather a socket, FIFO, or there is an error. In this case the remainder of the line doesn't correspond to the remaining headers -- the format of the line is described later under Sockets. INUM The inode number of the file. MODE The mode of the file. If the -n flag isn't specified, the mode is printed using a symbolic format (see strmode(3)); otherwise, the mode is printed as an octal number. SZ|DV If the file is not a character or block special, prints the size of the file in bytes. Otherwise, if the -n flag is not specified, prints the name of the special file as located in /dev. If that cannot be located, or the -n flag is specified, prints the major/minor device number that the special device refers to. R/W This column describes the access mode that the file allows. The letter ``r'' indicates open for reading; the letter ``w'' indicates open for writing. This field is useful when trying to find the processes that are preventing a filesystem from being down graded to read-only. MOUNT If the -n flag wasn't specified, this header is present and is the pathname that the filesystem the file resides in is mounted on. DEV If the -n flag is specified, this header is present and is the major/minor number of the device that this file resides in. NAME If filename arguments are specified and the -f flag is not, then this field is present and is the name associated with the given file. Normally the name cannot be determined since there is no mapping from an open file back to the directory entry that was used to open that file. Also, since different directory entries may reference the same file (via ln(2)), the name printed may not be the actual name that the process originally used to open that file. SOCKETS
The formating of open sockets depends on the protocol domain. In all cases the first field is the domain name, the second field is the socket type (stream, dgram, etc), and the third is the socket flags field (in hex). The remaining fields are protocol dependent. For tcp, it is the address of the tcpcb, and for udp, the inpcb (socket pcb). For unix domain sockets, its the address of the socket pcb and the address of the connected pcb (if connected). Otherwise the protocol number and address of the socket itself are printed. The attempt is to make enough information available to permit further analysis without duplicating netstat(1). For example, the addresses mentioned above are the addresses which the ``netstat -A'' command would print for tcp, udp, and unixdomain. Note that since pipes are implemented using sockets, a pipe appears as a connected unix domain stream socket. A unidirectional unix domain socket indicates the direction of flow with an arrow (``<-'' or ``->''), and a full duplex socket shows a double arrow (``<->''). BUGS
Since fstat takes a snapshot of the system, it is only correct for a very short period of time. SEE ALSO
netstat(1), nfsstat(1), ps(1), systat(1), vmstat(1), iostat(8), pstat(8) HISTORY
The fstat command appeared in 4.3BSD-Tahoe. 4th Berkeley Distribution February 25, 1994 4th Berkeley Distribution
All times are GMT -4. The time now is 01:42 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy