Does anyone know how to display the time with seconds
of when a file was last modified. I can get hour & minutes but
would also like seconds. --Running AIX (1 Reply)
Hi All,
I would like to know the file modification time till seconds in Unix. So I tried ls -e and it worked fine. This Solaris 5.10
-rw-rw-r-- 1 test admin 22 Sep 12 11:01:37 2008 test_message
But I am not able to run the same command in SOlaris 5.6 and also in AIX/HP
Is there... (3 Replies)
Environment is cygwin on Windows Server 2003 as I could not think how I would achieve this using Windows tools.
What I want ot achieve is the following.
I have a Directory D:\Data which contains further subfolders and files. I need to move "files" older than 6 months modification time to... (4 Replies)
Hi All,
I have two files (given below) each exists under different paths. I want to compare the modification time stamp of file1.txt is lessthan the modification time of file2.txt.
month1=`ls -l file1.txt | awk '{ print $6}'`
date1=`ls -file1.txt | awk '{ print $7}'`
time1=`ls... (1 Reply)
Hi,
I have a directory made up of many symbolic links to folders multiple file systems.
I want to return folders modified within the last 50 days, but find is using the link time rather than the target time.
find . -type d -mtime -50
Is there a way to either:
a) Make a symbolic link... (1 Reply)
Hi all,
I need the modification time of a file on a particular day say 3 days before.
I just don't want the last modification time. I need all the modification times on a particualar day.
Is there anyway to do it? Kindly help. Could anyone tell me where the modification time is stored?... (1 Reply)
Hi everyone,
I'd like to know if is there a way to list files but ignoring some according to their modification time (or creation, access time, etc.) with the command 'ls' alone.
I know the option -I exist, but it seems to only looking in the file name..
Thank you in advance for the... (8 Replies)
This example shows last mtime from epoch
$ stat -f %m somefile
752911565
But would like to see it like that:
199311100606.05 (2 Replies)
Discussion started by: Tribe
2 Replies
LEARN ABOUT MOJAVE
strtok
STRTOK(3) BSD Library Functions Manual STRTOK(3)NAME
strtok, strtok_r -- string tokens
LIBRARY
Standard C Library (libc, -lc)
SYNOPSIS
#include <string.h>
char *
strtok(char *restrict str, const char *restrict sep);
char *
strtok_r(char *restrict str, const char *restrict sep, char **restrict lasts);
DESCRIPTION
This interface is obsoleted by strsep(3).
The strtok() function is used to isolate sequential tokens in a null-terminated string, str. These tokens are separated in the string by at
least one of the characters in sep. The first time that strtok() is called, str should be specified; subsequent calls, wishing to obtain
further tokens from the same string, should pass a null pointer instead. The separator string, sep, must be supplied each time, and may
change between calls.
The implementation will behave as if no library function calls strtok().
The strtok_r() function is a reentrant version of strtok(). The context pointer last must be provided on each call. The strtok_r() function
may also be used to nest two parsing loops within one another, as long as separate context pointers are used.
The strtok() and strtok_r() functions return a pointer to the beginning of each subsequent token in the string, after replacing the token
itself with a NUL character. When no more tokens remain, a null pointer is returned.
EXAMPLES
The following uses strtok_r() to parse two strings using separate contexts:
char test[80], blah[80];
char *sep = "\/:;=-";
char *word, *phrase, *brkt, *brkb;
strcpy(test, "This;is.a:test:of=the/string\tokenizer-function.");
for (word = strtok_r(test, sep, &brkt);
word;
word = strtok_r(NULL, sep, &brkt))
{
strcpy(blah, "blah:blat:blab:blag");
for (phrase = strtok_r(blah, sep, &brkb);
phrase;
phrase = strtok_r(NULL, sep, &brkb))
{
printf("So far we're at %s:%s
", word, phrase);
}
}
SEE ALSO memchr(3), strchr(3), strcspn(3), strpbrk(3), strrchr(3), strsep(3), strspn(3), strstr(3), wcstok(3)STANDARDS
The strtok() function conforms to ISO/IEC 9899:1990 (``ISO C90'').
AUTHORS
Wes Peters, Softweyr LLC: <wes@softweyr.com>
Based on the FreeBSD 3.0 implementation.
BUGS
The System V strtok(), if handed a string containing only delimiter characters, will not alter the next starting point, so that a call to
strtok() with a different (or empty) delimiter string may return a non-NULL value. Since this implementation always alters the next starting
point, such a sequence of calls would always return NULL.
BSD November 27, 1998 BSD