11-17-2019
Thanks RudiC...your code worked perfectly!
Thanks for the reply MadeinGermany. I needed a one liner but I'll save your example code for future reference!
Appreciate all your help.
9 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
The purpose of those comands are to find the newest file in a directory acvrdind to system date, and it has to be recursively found in each directory.
The problem is that i want to list in a long format every found file, but the commands i use produce unexpected results ,so the output lists in a... (5 Replies)
Discussion started by: alexcol
5 Replies
2. Shell Programming and Scripting
I have the following statement in script:
find ${LANDING_FILE_DIR}${BTIME_FILENAME_PATTERN2} -print | while read file; do
...
done
When there are no files located by the find comand it returns:
"find: bad status-- /home/rnitcher/test/....." to the command line
How do I get control in... (3 Replies)
Discussion started by: mavsman
3 Replies
3. Shell Programming and Scripting
I want the output of the find command to be printed and also the total files found by it. Can someone help in this.
Obviously $ find . -type f | wc -l will not output the files found but only the count. I want both. There can be millions and trillions of files so dont want the output of find... (3 Replies)
Discussion started by: amicon007
3 Replies
4. UNIX for Dummies Questions & Answers
Hi,
i'm currently writing a script which tidys up old files. When using the find command I found that some files were not being listed
/export/home/ops***/test: ls -l processed
total 0
-rw-rw-r-- 1 ops*** ****** 0 Apr 20 11:53 test99
/export/home/ops***/test: ls -l
total 4... (9 Replies)
Discussion started by: chris01010
9 Replies
5. UNIX for Dummies Questions & Answers
Trying to locate files less than xx days old, throughout all directories/subdirectories, but excluding certain types of directories and files.
The directories I want to search all contain the same characteristic (dbdef, pldef, ghdef, etc), and there are subdirectories within that I need to... (2 Replies)
Discussion started by: Condmach
2 Replies
6. Shell Programming and Scripting
:):):):):) (0 Replies)
Discussion started by: bryan101
0 Replies
7. Red Hat
Dear,
I am using Redhat 6.6 . How to identify a given directory is part of which mount point. (2 Replies)
Discussion started by: aneesha
2 Replies
8. Shell Programming and Scripting
Hi, I am new in scripting, and I am currently working on a script that will look for other files in a certain directory and exclude some file type.
this works fine:Find_File2Exclude=`find ${paths} -maxdepth 1 -type f \( ! -iname '*.out' ! -iname '*.auc' ! -iname '*.cps' ! -iname '*.log' ! -iname... (4 Replies)
Discussion started by: kedd05
4 Replies
9. UNIX for Beginners Questions & Answers
Hello Forum,
I'm using the following command to find all inactive kernels installed on my RHEL server:
$ rpm -qa | grep '^kernel-' |grep -vE `uname -r`
but the result is in two lines:
kernel-3.10.0-1062.1.1.el7.x86_64
kernel-3.10.0-1062.el7.x86_64
Is there a one line command I can... (3 Replies)
Discussion started by: greavette
3 Replies
LEARN ABOUT REDHAT
perlcc
PERLCC(1) Perl Programmers Reference Guide PERLCC(1)
NAME
perlcc - generate executables from Perl programs
SYNOPSIS
$ perlcc hello # Compiles into executable 'a.out'
$ perlcc -o hello hello.pl # Compiles into executable 'hello'
$ perlcc -O file # Compiles using the optimised C backend
$ perlcc -B file # Compiles using the bytecode backend
$ perlcc -c file # Creates a C file, 'file.c'
$ perlcc -S -o hello file # Creates a C file, 'file.c',
# then compiles it to executable 'hello'
$ perlcc -c out.c file # Creates a C file, 'out.c' from 'file'
$ perlcc -e 'print q//' # Compiles a one-liner into 'a.out'
$ perlcc -c -e 'print q//' # Creates a C file 'a.out.c'
$ perlcc -I /foo hello # extra headers (notice the space after -I)
$ perlcc -L /foo hello # extra libraries (notice the space after -L)
$ perlcc -r hello # compiles 'hello' into 'a.out', runs 'a.out'.
$ perlcc -r hello a b c # compiles 'hello' into 'a.out', runs 'a.out'.
# with arguments 'a b c'
$ perlcc hello -log c # compiles 'hello' into 'a.out' logs compile
# log into 'c'.
DESCRIPTION
perlcc creates standalone executables from Perl programs, using the code generators provided by the B module. At present, you may either
create executable Perl bytecode, using the "-B" option, or generate and compile C files using the standard and 'optimised' C backends.
The code generated in this way is not guaranteed to work. The whole codegen suite ("perlcc" included) should be considered very experimen-
tal. Use for production purposes is strongly discouraged.
OPTIONS
-Llibrary directories
Adds the given directories to the library search path when C code is passed to your C compiler.
-Iinclude directories
Adds the given directories to the include file search path when C code is passed to your C compiler; when using the Perl bytecode
option, adds the given directories to Perl's include path.
-o output file name
Specifies the file name for the final compiled executable.
-c C file name
Create C code only; do not compile to a standalone binary.
-e perl code
Compile a one-liner, much the same as "perl -e '...'"
-S Do not delete generated C code after compilation.
-B Use the Perl bytecode code generator.
-O Use the 'optimised' C code generator. This is more experimental than everything else put together, and the code created is not guaran-
teed to compile in finite time and memory, or indeed, at all.
-v Increase verbosity of output; can be repeated for more verbose output.
-r Run the resulting compiled script after compiling it.
-log
Log the output of compiling to a file rather than to stdout.
perl v5.8.0 2003-02-18 PERLCC(1)