Sponsored Content
Full Discussion: List grep results
Top Forums UNIX for Dummies Questions & Answers List grep results Post 302094083 by napolayan on Wednesday 25th of October 2006 05:47:34 AM
Old 10-25-2006
slire,

Its not possible to get the file creation date in UNIX. Thats the answer i have got after going thru the threads on this topic. The only things u can get are time of last modification n time of last access. Weird, but apparently true.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to refine results of grep -p

I need help to further reduce the output shown below. I want to be able to only return the paragraph where the 'Database alias' is exactly equal to DBIHP. I do not want the other paragraphs being shown below. $ echo $dbalias DBIHP $ db2 list db directory|grep -p 'Database alias ... (2 Replies)
Discussion started by: priceb
2 Replies

2. UNIX for Dummies Questions & Answers

My ps -ef|grep command results are chopped off

On our one HP-UX 11i box, we have some very long paths defined. When I want to check on our user processes running, the resulting paths are chopped off. /xyz/abc/123/......./server/b is really a process running in the ..../server/bin directory. Is this a terminal problem or buffer length... (1 Reply)
Discussion started by: bsp18974
1 Replies

3. Shell Programming and Scripting

Selecting patterns from the results of grep

Hi All, I'm struggling with a problem that I'm wondering (and hoping!) that someone can help me with. I have a number of .xml files which I'm using grep to search for the string 'include'. I need to extract the value of the include from the grep result. For example, on any given file, I... (2 Replies)
Discussion started by: Steve_altius
2 Replies

4. Shell Programming and Scripting

Adding grep'd results in a variable

Here is one I am baffled with; I have not used unix for a while and now that I am back it has been fun remembering and I have enjoyed it, for the most past. this is in ksh. I need to search in a file for the line with X1 and cut columns 20-25, put them into a variable, added them (dollar... (3 Replies)
Discussion started by: CougarMutt
3 Replies

5. Shell Programming and Scripting

Grep no results

Hello guys, I have been looking around but can't find the answer to my problem: If the grep command displays no results, print "no results have been found" and increment x. But if the grep command find something, do nothing. if echo "no results have been found $x" x=`expr $x + 1 `... (3 Replies)
Discussion started by: Benou
3 Replies

6. UNIX for Dummies Questions & Answers

How to do ls -l on results of grep and find?

Hi, Am running the command below to search for files that contains a certain string. grep -il "shutdown" `find . -type f -mtime -1 -print` | grep "^./scripts/active" How do I get it to do a ls -l on the list of files? I tried doing ls -l `grep -il "shutdown" `find . -type f -mtime -1... (5 Replies)
Discussion started by: newbie_01
5 Replies

7. Shell Programming and Scripting

How to analyse results of grep

Hi all, I'm working with a peice of software that runs on Linux that allows planning trips in cars through maps. This software has different variations depending on the type of car, e.g. BMW, Audi, Hyundai, etc... Each variation has a dependency on common external components that are not... (1 Reply)
Discussion started by: emoshaya
1 Replies

8. UNIX for Dummies Questions & Answers

Grep not giving expected results

Version: RHEL 5.8 I am doing a grep of the piped output from ps command as shown below. I am grepping for the pattern ora_dbw* . But, in the result set I am seeing strings with ora_dbr* as well like ora_dbrm_SDLM1DAS3 as shown below. Any idea why is this happening ? $ ps -ef | grep... (6 Replies)
Discussion started by: John K
6 Replies

9. Shell Programming and Scripting

How to concatenate grep results?

hi, let's say we have input in files test1.txt, test2.txt, text3.txt ... ... ... ('...' means more files & lines not just 'dots') test1.txt has: A B C D ... ... ... test2.txt has A B C D ... ... ... (4 Replies)
Discussion started by: msonoth
4 Replies

10. Shell Programming and Scripting

Cannot get results from grep command

Hi, i have a file hello.log which as several line that look like the below 2015-12-07 09:46:56 0:339 120.111.12.12 POST /helloWorld 2015-12-07 09:46:57 0:439 122.111.12.12 POST /helloWorld .... when i grep expecting to see results like the below. ... (6 Replies)
Discussion started by: mohtashims
6 Replies
touch(1)						      General Commands Manual							  touch(1)

NAME
touch - update access, modification, and/or change times of file SYNOPSIS
ref_file time] file_name... Obsolescent time_str file_name... DESCRIPTION
updates the access, modification, and last-change times of each argument. The file name is created if it does not exist. If no time is specified (see date(1)) the current time is used. The and options are mutually exclusive. Options The following options are available: Change the access time of file_name to time, or to the current time if time is not specified. Do not change the modification time unless is also specified. Change the modification time of file_name to time, or to the current time if time is not specified. Do not change the access time unless is also specified. Silently prevent from creating the file if it did not previously exist. Do not write any diagnostic messages concerning this condi- tion. Use the corresponding time of ref_file instead of the current time. Use the specified time instead of the current time. The option argument is a decimal number of the form: [[CC]YY]MMDDhhmm[.SS] where each two digits represents the following: CC The first two digits of the year. YY The second two digits of the year. MM The month of the year (01-12). DD The day of the month (01-31). hh The hour of the day (00-23). mm The minute of the hour (00-59). SS The second of the minute (00-61). If neither CC nor YY is given, the current year is assumed. If YY is specified, but CC is not, CC is derived as fol- lows: (taken into account the local time factor) If YY is: CC becomes: ------------------------ 69-99 19 00-68 20 If the resulting time value precedes the Epoch (00:00:00 January 1, 1970 Greenwich Mean Time), exits immediately with an error status. The range for SS is 00 through 61 rather than 00 through 59 to accommodate leap seconds. If SS is 60 or 61, and the resulting time, as affected by the environment variable, does not refer to a leap second, the resulting time is one second after a time where SS is 59. If SS is not given a value, it is assumed to be 0. The syntax shown by the second line is recognized when neither the option, the option, nor the option delimiter is specified, and the first operand consists of all decimal digits. This operand is interpreted as the time argument instead of as a file name. However, in this case, time_str is assumed to be of the form: MMDDhhmm[YY] This is for backward compatibility. The form given above is recommended for future portability. The option delimiter can be used before the first file_name if there is a possibility that file_name consists of all digits, in order to ensure that the first syntax is used. succeeds when invoked by the of the file if any of the following are true: o A time is specified. o Only the access time of the file is being updated. o Only the modification time of the file is being updated. In addition, succeeds when invoked by a user with write permission on the file if of the following are true: o No time is specified. o the access time and modification time of the file are being updated. EXTERNAL INFLUENCES
Environment Variables If the time is specified via the option, is used to interpret the time for the specified time zone. determines the language in which messages are displayed. If is not specified in the environment or is set to the empty string, the value of is used as a default for each unspecified or empty vari- able. If is not specified or is set to the empty string, a default of "C" (see lang(5)) is used instead of If any internationalization variable contains an invalid setting, behaves as if all internationalization variables are set to "C". See environ(5). International Code Set Support Single- and multibyte character code sets are supported. RETURN VALUE
returns the following values: All file_name arguments were successfully changed. Prints out a diagnostic message if an invalid time or a time earlier than the Epoch was specified with the option, or if the and options were both specified, or if one or more of the file_name arguments could not be accessed. EXAMPLES
The following command sets the modification and access times of the file named "bastille" to midnight, July 14, 1989, creating the file if it does not already exist. The following command does the same thing using the backward-compatible syntax: The following command sets the time of the two files named "0714000089" and "bastille" to the current time, creating them if they do not exist: To create a zero-length file, use any of the following: DEPENDENCIES
NFS An attempt to touch a file owned by the superuser on a remote server can fail, even if the invoking user has write permission on the file. SEE ALSO
date(1), utime(2). STANDARDS CONFORMANCE
touch(1)
All times are GMT -4. The time now is 04:49 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy