Hi all,
I will have to check a directory which is full of files. If any file more than 5 MB of space exists, write on it's head "Checked". Please help me.
Thanks in advance!
Deepak (5 Replies)
I'm looking to write a script that will check the contents of a directory, and if any files exist in that directory copy them to a temporary folder. The target files are only resident for a few seconds, so I think the script needs to be running constantly.
Any pointers would be really... (3 Replies)
cp $PATHLOGS/$DATE/*.* $TMP/logs_tmp/
cp $PATHLOGS/$DATE1/*.* $TMP/logs_tmp/
Before copying the files I have to check if the directory $DATE1 and $DATE2 exists.
If directory exists then, check if the folder contains some files.
if the file exists then, check if the file size is greater... (3 Replies)
Hi Everyone,
I am writing a shell script for the below needs and would like your suggestions and advices.
I have a lot of scripting files(Shell Scripts) under the directory:
/home/risk_dev/dev
I have another directory which has a lot of shell scripts under the directory:
... (2 Replies)
I want to perform SQL *Loader operation only if a file named "load.txt" exists in a directory "/home/loc/etc". Please help how to check this with a if condition. (8 Replies)
Hi Gurus,
I have a requests to find if all the file in the filelist exist in certain directory.
example:
my filelist
abc
def
ddd
cde
afg
how can I find these 5 files exists at director /home/abc
Thanks in advance (7 Replies)
Hello experts,
I am facing an very typical problem and hope the issue can be solved.
I have a page download.cgi in /cgi-bin folder.
use CGI;
use CGI::Carp qw ( fatalsToBrowser );
use File::Copy
copy("C:\\Program Files\\Apache Software... (8 Replies)
Hi guys,
I am beginner trying to learn unix. So any help is welcomed.
My requirement is to check whether is a file exists in a particular directory or not.
The directory path and filename are taken dynamically with user interaction. So the program should continue only if the $filename... (1 Reply)
There are some files with suffix dates like abc_20032019.dat abc_17032019.dat
If at least one file exists then perform some operation else exit from execution.
Korn shell
----------------------------------
array=($inputdir/abc*.dat)
If ] ]
then
echo " file exits"
else
echo " file does... (10 Replies)
he below looks in $dir for any pattern of fileone. As is, it executes but only returns File found if the exact format in the script exsists. Why isn't a pattern of fileone being looked for and if it is in $dir, File found. I think that is what should happen. Thank you :).
dir=/path/to
if... (5 Replies)
Discussion started by: cmccabe
5 Replies
LEARN ABOUT LINUX
fifo
FIFO(7) Linux Programmer's Manual FIFO(7)NAME
fifo - first-in first-out special file, named pipe
DESCRIPTION
A FIFO special file (a named pipe) is similar to a pipe, except that it is accessed as part of the file system. It can be opened by multi-
ple processes for reading or writing. When processes are exchanging data via the FIFO, the kernel passes all data internally without writ-
ing it to the file system. Thus, the FIFO special file has no contents on the file system; the file system entry merely serves as a refer-
ence point so that processes can access the pipe using a name in the file system.
The kernel maintains exactly one pipe object for each FIFO special file that is opened by at least one process. The FIFO must be opened on
both ends (reading and writing) before data can be passed. Normally, opening the FIFO blocks until the other end is opened also.
A process can open a FIFO in nonblocking mode. In this case, opening for read only will succeed even if no-one has opened on the write
side yet, opening for write only will fail with ENXIO (no such device or address) unless the other end has already been opened.
Under Linux, opening a FIFO for read and write will succeed both in blocking and nonblocking mode. POSIX leaves this behavior undefined.
This can be used to open a FIFO for writing while there are no readers available. A process that uses both ends of the connection in order
to communicate with itself should be very careful to avoid deadlocks.
NOTES
When a process tries to write to a FIFO that is not opened for read on the other side, the process is sent a SIGPIPE signal.
FIFO special files can be created by mkfifo(3), and are indicated by ls -l with the file type 'p'.
SEE ALSO mkfifo(1), open(2), pipe(2), sigaction(2), signal(2), socketpair(2), mkfifo(3), pipe(7)COLOPHON
This page is part of release 3.27 of the Linux man-pages project. A description of the project, and information about reporting bugs, can
be found at http://www.kernel.org/doc/man-pages/.
Linux 2008-12-03 FIFO(7)