Sponsored Content
Top Forums Shell Programming and Scripting Mtime or the equivalent for HP-UX Post 303031211 by Don Cragun on Saturday 23rd of February 2019 10:35:55 PM
Old 02-23-2019
Hi Jim,
The lpstat utility was dropped from the POSIX standards in 2001, but many systems will still provide it as an extension. The lpstat utility was part of the old UNIX System V line printer administration utilities and its definition at that time was hindering development of the CUPS (Common UNIX Print System) tools that were evolving at that time. CUPS frequently includes a utility named lpstat, but the output it provides is not necessarily similar to the output produced by UNIX System V or BSD variants of that utility.

Although CUPS is readily available on many systems now, it has not formally been standardized and I have not been closely enough involved in its development to make any guesses at how much variation there is in the output format used by lpstat on current systems.

You are correct in nothing that ls -l output uses month, day, hour, and minute when displaying file dates that in the range from now through six months ago. Older and newer dates use month, day, and year. (Note that when listing files found on a network, it is fairly common to see a file that has a timestamp a few milliseconds in the future if the filesystem servers aren't using network time protocol synchronization to keep their clocks in sync.)

Hope this helps,
Don
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

mtime vs ctime

:D i have a slight problem and would appreciate if someone could clarify the confusion.. i use find alot and so far i have done ok.. but it just struck me a couple of days ago that I am not quite sure what the difference between the modification time and the change time as in ctime and mtime and... (3 Replies)
Discussion started by: moxxx68
3 Replies

2. UNIX for Dummies Questions & Answers

find . -mtime

...what am i doing wrong?? I need to find all files older than 30 days and delete but I can't get it to pull details for ANY + times. The file below has a time stamp which is older than 1 day, however if I try and select it using any of the -time flags it just doesn't see it. (the same thing... (1 Reply)
Discussion started by: topcat8
1 Replies

3. UNIX for Dummies Questions & Answers

mtime help!!!!!

thank you for the help. (2 Replies)
Discussion started by: scooter17
2 Replies

4. Shell Programming and Scripting

mtime

hi, :) consider the following statement find . -type f -mtime -1 -print here what is the use of -1 option. any help? cheers RRK (7 Replies)
Discussion started by: ravi raj kumar
7 Replies

5. UNIX for Dummies Questions & Answers

-mtime +30

Hello, Can someone help me to understand the following: find /test/rman/ -mtime +30 -exec rm '{}' \; What does -mtime +30 mean? Thanks! (1 Reply)
Discussion started by: Blue68
1 Replies

6. Shell Programming and Scripting

mtime

Hi, I've some files of some past days and everyday some new files are also getting added to the same. Now how can i use mtime to get the files of the current date i.e if i want the files of 25th feb 2009 and if im finding the files on 25th 12:10 am then i should only get the files after... (4 Replies)
Discussion started by: ss_ss
4 Replies

7. UNIX for Dummies Questions & Answers

(find) mtime vs. (unix) mtime

Hi I've made some test with perl script to learn more about mtime... So, my question is : Why the mtime from findfind /usr/local/sbin -ctime -1 -mtime -1 \( -name "*.log" -o -name "*.gz" \) -print are not the same as mtime from unix/linux in ls -ltr or in stat() function in perl : stat -... (2 Replies)
Discussion started by: hiddenshadow
2 Replies

8. Shell Programming and Scripting

find -mtime +7

Dear all, find $ADMIN_DIR/$SID/arch/ -name '*.gz' -mtime +7 -exec rm {} \; is it retaining 7 days OR 8 days .gz files ? Thanks Prakash (10 Replies)
Discussion started by: prakashoracledb
10 Replies

9. Red Hat

-mtime command

Hello, what this command do. find /oracle/u01/app/oracle/admin/rdz/udump/ -name "*.trc" -mtime +1 Thanks, Umair (1 Reply)
Discussion started by: umair
1 Replies

10. Shell Programming and Scripting

Mtime issue

Dear all, i am trying to find all files created one day before, for example 26 October, and i am using this command: find . -type f -daystart -mtime 1 This command in fact lists all files created on 26 October, but the files between midnight 00:00 26 Oct and 01:00 26 Oct, does not shown... (4 Replies)
Discussion started by: arrals_vl
4 Replies
lpstat(1)						      General Commands Manual							 lpstat(1)

NAME
lpstat - Displays line printer status information SYNOPSIS
lpstat [-a[list]] [-c[list]] [-d | -r | -s | -t] [-o[list]] [-p[list]] [-u[list]] [-v[list]] [request_ID...] The lpstat command displays information about the current status of the line printer. STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: lpstat: XCU5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. OPTIONS
Specifies the display of acceptance status (with respect to the lp and lpr commands) of destinations for requests. The list argument is a list of intermixed printer names and request IDs. Write the class names and their members. The list argument is a list of class names. Specifies the display of the system default destination for the lp and lpr commands. Specifies the display of the status of printer requests. The list argument is a list of intermixed printer names and request IDs. Note that when combined, the -o and -u options do not produce merged output. Specifies the display of the status of printers. The list argument is a list of printer names. Specifies the dis- play of the status of the line printer daemon. Specifies the display of a status summary, including the status of the line printer sched- uler, the system default destination, and a list of printers and their associated devices. Specifies the display of all status informa- tion. Specifies the display of the status of all printer requests. The list argument is a list of usernames. The list argument is a list of intermixed printer names and request IDs. Note that when combined, the -o and -u options do not produce merged output. Specifies the display of the names of printers and the path names of the devices associated with them. The list argument is a list of printer names. OPERANDS
A request ID as returned by lp or lpr. DESCRIPTION
If no options are given, then lpstat displays the status of all requests made by the lp and lpr commands. Any arguments that are not options are assumed to be a request_ID (as returned by the lp or lpr commands). The lpstatcommand displays the status of such requests. Options can appear in any order and can be repeated and intermixed with other options. Some options can be followed by an optional list that is either a list of items separated from one another by a , (comma), or a list of items enclosed in " " (double quotes) and separated from one another by a comma or one or more spaces. For example: -u"user1, user2, user3" Specifying just the option with no arguments causes all information pertaining to that option to be displayed. If the LPDEST environment variable is set to a valid printer name, this becomes the default destination; otherwise, PRINTER is tried and, as a last resort, a system-specific printer. NOTES
The lpstat utility is marked LEGACY in XCU Issue 5. [Tru64 UNIX] Output produced by the lpstat command is very similar to output from lpq and lpc, rather than output from earlier versions of lpstat. EXIT STATUS
The following exit values are returned: Successful completion. An error occurred. ENVIRONMENT VARIABLES
The following environment variables affect the execution of lpstat: Provides a default value for the internationalization variables that are unset or null. If LANG is unset or null, the corresponding value from the default locale is used. If any of the internationalization variables contain an invalid setting, the utility behaves as if none of the variables had been defined. If set to a non-empty string value, overrides the values of all the other internationalization variables. Determines the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed to multibyte characters in arguments). Determines the locale for the format and contents of diagnostic messages written to standard error. Determines the location of message catalogues for the processing of LC_MESSAGES. Determines the time zone used with date and time strings. FILES
Printer description file. Spool directories. Minimum free space to leave. Line printer devices. Socket for local requests. Daemon con- trol files. Data files specified in cf files. Temporary copies of cf files. Lock file used to obtain the process ID of the current dae- mon and the request ID of the currently active request. SEE ALSO
Commands: lp(1), lpc(8), lpd(8), lpq(1), lpr(1), lprm(1) Files: printcap(4) Standards: standards(5) lpstat(1)
All times are GMT -4. The time now is 03:29 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy