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)
I have a '~' delimited file of 6 - 7 million rows. Each row should contain 13 columns delimited by 12 ~'s. Where there are 13 tildes, the row needs to be removed. Each row contains alphanumeric data and occasionally a ~ ends up in a descriptive field and therefore acts as a delimiter, resulting in... (1 Reply)
I need to awk a value out of a file and see if it exists in another file.
My if statement below returns a positive even if the value doesn't exist.
The kky3 is finding the correct field for the value.
cat $PRE | while read a
do
kky2=`echo $a | awk -F: '{print $2}'`
echo "kky2 "... (5 Replies)
Hi,
suppose i have a txt file containing thye following data
2012156|sb3|nwknjps|BAYONNE|NJ|tcg
201221|094|mtnnjprc:HACKENSACK|NJ|tcg
201222|wn3|mtnnjtc|HACKENSACK|NJ|tcg
2018164|ik4|mtnntc|JERSEY CITY|NJ|tcg
20123482|ik4|mtnnjpritc,JERSEY CITY|NJ|tcg... (3 Replies)
Hi again All :)
After posting my first thread just a few eeks ago and having such a great response (Thank You once again :) ), I thought I'd perhaps ask the experts again. In short I'm trying to achieve a "find" and "copy" where the find needs to find directories:
find -d -name outbox
and... (6 Replies)
I believe what is happening is rm is executing in the script on every directory and on failure of the first it stops although returns status 0.
find $HOME -name /directory/filename | xargs -l rm
This is the code I use but file remains. I am using sun solaris system which has way limited... (4 Replies)
Hi all,
I have a question..
Here is my requirement..I have 500 files in a path say /a/b/c
I have some numbers in a file which are comma seperated...and I wanted to check if the numbers are present in the FileName in the path /a/b/c..if the number is there in the file that is fine..but if... (1 Reply)
Hi all,
I am a newbie here. I have this requirement to find a file based on a pattern then return the filename if found.
I created a script based on online tutorials. Though, I am stuck & really appreciate if anyone can have a quick look & point me to the right direction?
#Script starts... (10 Replies)
I've been struggling with this one for quite a while and cannot seem to find a solution for this find/replace scenario. Perhaps I'm getting rusty.
I have a file that contains a number of metrics (exactly 3 fields per line) from a few appliances that are collected in parallel. To identify the... (3 Replies)
Hello Forum,
We have two bootstraps of Chef in our environment which are identified by colour:
/var/chef/cache/cookbooks/bootstrap_cookbooks_version_green
and
/var/chef/cache/cookbooks/bootstrap_cookbooks_version_red
I'm attempting to identify which version is installed based on the name... (11 Replies)
Discussion started by: greavette
11 Replies
LEARN ABOUT BSD
lstat
STAT(3F)STAT(3F)NAME
stat, lstat, fstat - get file status
SYNOPSIS
integer function stat (name, statb)
character*(*) name
integer statb(12)
integer function lstat (name, statb)
character*(*) name
integer statb(12)
integer function fstat (lunit, statb)
integer statb(12)DESCRIPTION
These routines return detailed information about a file. Stat and lstat return information about file name; fstat returns information
about the file associated with fortran logical unit lunit. The order and meaning of the information returned in array statb is as
described for the structure stat under stat(2). The ``spare'' values are not included.
The value of either function will be zero if successful; an error code otherwise.
FILES
/usr/lib/libU77.a
SEE ALSO stat(2), access(3F), perror(3F), time(3F)BUGS
Pathnames can be no longer than MAXPATHLEN as defined in <sys/param.h>.
4.2 Berkeley Distribution May 15, 1985 STAT(3F)