Sponsored Content
Top Forums UNIX for Dummies Questions & Answers I want alternative of -maxdepth 1 for all Linux,Solaris and AIX Post 302745459 by Peasant on Monday 17th of December 2012 09:49:23 AM
Old 12-17-2012
You can use the $PWD (print working directory) to eliminate the variable $DIR
Code:
find . \(  -name . -o -prune \) -name "*properties"  -exec ls -l {} \; -exec cksum {} \; | sed "s#./#$PWD/#"

This User Gave Thanks to Peasant For This Post:
 

6 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Major differences between AIX, Solaris, HP-UX, Linux

Hi All, I want to know the OS level differences between AIX, Solaris, HP-UX, Linux Apart from the vendor, H/w and command differences, any other significant points. regards, guru Charan (9 Replies)
Discussion started by: gurukottur
9 Replies

2. AIX

AIX on an alternative system

My greeting to all the readers I have an AIX 5.3 version. I want to study this operation system. Unfortunately I don't have an IBM p Series system. Is there a way to install AIX on vmware or something similar? May be I have an old IBM Netfinity Server, will AIX run on this system? Thanks for... (5 Replies)
Discussion started by: analyzer
5 Replies

3. UNIX for Dummies Questions & Answers

Solaris find without maxdepth

Hi, I am using Solaris 5.8 I searched online, the find command has an option called maxdepth which can be used to limit the number of directories find will look into. find . -maxdepth 2 -type f When I run the above command in solaris, I get an error find: bad option -maxdepth find:... (2 Replies)
Discussion started by: Leion
2 Replies

4. AIX

maxdepth in avaible for AIX?

Hi, I'm trying to do a search in a directory on AIX and I was wondering if there's an equivelant option to the -maxdepth option to tell how far down to search. I ran this but I just want to make sure it's actually searching everything: find ./* -type f -name "090817*" -exec ls -l {} \; (1 Reply)
Discussion started by: bbbngowc
1 Replies

5. Solaris

Patch management (Solaris, AIX , Linux )

Hi Guys, I am doing L1 Level support for Solaris Platform. Eg. User Management, File system , Print management and Job monitoring. I recently completer my IBM Aix 7 Administration certification. Issue is that my manager is asking me do full time unix / linux patch management work for new... (5 Replies)
Discussion started by: Nats
5 Replies

6. Shell Programming and Scripting

Maxdepth command not working in AIX.Need alternative solution for this command

Hi All, I am trying to select 30 days older files under current directory ,but not from subdirectory using below command. find <Dir> -type f -mtime + 30 This command selecting all the files from current directory and also from sub directory . I read some documention through internet ,... (1 Reply)
Discussion started by: kommineni
1 Replies
PWD(1)                                                             User Commands                                                            PWD(1)

NAME
pwd - print name of current/working directory SYNOPSIS
pwd [OPTION]... DESCRIPTION
Print the full filename of the current working directory. -L, --logical use PWD from environment, even if it contains symlinks -P, --physical avoid all symlinks --help display this help and exit --version output version information and exit If no option is specified, -P is assumed. NOTE: your shell may have its own version of pwd, which usually supersedes the version described here. Please refer to your shell's docu- mentation for details about the options it supports. AUTHOR
Written by Jim Meyering. REPORTING BUGS
GNU coreutils online help: <http://www.gnu.org/software/coreutils/> Report pwd translation bugs to <http://translationproject.org/team/> COPYRIGHT
Copyright (C) 2017 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>. This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. SEE ALSO
getcwd(3) Full documentation at: <http://www.gnu.org/software/coreutils/pwd> or available locally via: info '(coreutils) pwd invocation' GNU coreutils 8.28 January 2018 PWD(1)
All times are GMT -4. The time now is 05:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy