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.
This command selecting all the files from current directory and also from sub directory .
I read some documention through internet , most of them suggested to use "-maxdepth" command. but this command is not working in AIX .
kindly help me for any other alternative solution ?
Last edited by Franklin52; 02-14-2014 at 03:15 AM..
Reason: Please use code tags
put prtconf command,after show this error message:
bash-3.00# prtconf
/usr/sbin/prtconf: msize=msize + 12544^J12544: syntax error
pleae help me...........waiting for replay
by
mohan.s
Aix sysadmin
(deleted email, rule violation) (2 Replies)
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)
Hi everyone,
when executing this command in unix:
echo "WM7 Fatal Alerts:", $(cat query1.txt) > a.csvIt works fine, but running this command in a shell script gives an error saying that there's a syntax error.
here is content of my script:
tdbsrvr$ vi hc.sh
"hc.sh" 22 lines, 509... (4 Replies)
find /full/path/dir \( ! -name dir -o -type f \) -prune -type f
on AIX it worked perfect :
sdp1:/var/tmp/test# find /var/tmp/test/ \( ! -name test -o -type f \) -prune \
-name "*properties" -type f -exec ls -l {} \; -exec cksum {} \;
-rw------- 1 root system 19 Dec 12... (5 Replies)
Hi
1st problem
--------------
i have this sed command in my unix script which replaces new line and carriage return in a line with the string "
"
the script works fine in Linux 3.0.101-0.5, but not in AIX 1 7 , the "s/\r/\
/g" replacement, replaces
all the character "r" in the file.... (3 Replies)
Can you please figure out what is the issue here
$ find . -maxdepth 1 -type f -size 0 -print
find: bad option -maxdepth
please find the OS details
$ uname -a
HP-UX g5u1216 B.11.31 U ia64 2614088426 unlimited-user license
Use code tags, thanks. (6 Replies)
Hello,
I am running find command in an AIX Server to find last 7 days modified directories/files.
>cd /usr/openv/netbackup/db/class
>ls -l
total 0
drwxr-xr-x 3 root system 256 May 28 2014 Catalog-Backup
drwxr-xr-x 3 root system 256 Sep 18 2012 ... (4 Replies)
Hello i am having an issue with bash script and this is the code
now=$(cat hosts1.txt | awk '{print $2;}')
while read n ;do
ssh root@$now 'useradd test1; echo -e "test1\ntest1" | passwd test1 && echo "test1 ALL=(ALL:ALL) ALL" >> /etc/sudoers'
When i execute only part with cat, it... (8 Replies)
Good Afternoon,
I'm backing up a folder from one NAS to another using a unix script using cp. Its a lot of files and takes several days to complete. Most of the files don't change from week to week. Is there a command that would be quicker?
Also note, the backup needs to be ready-to-use in... (5 Replies)
Discussion started by: Stellaman1977
5 Replies
LEARN ABOUT OSF1
mread
mread(1) General Commands Manual mread(1)NAME
mread - mtools utility to perform a low level read (copy) of a DOS file to UNIX
SYNOPSIS
mread [-tnm] msdosfile unixfile
mread [-tnm] msdosfile [msdosfiles...] unixdirectory
OPTIONS
Preserves the file modification time. Specifies that a warning is not issued when an existing file is specified as the target file. If
this option is not specified, the mread command verifies whether or not to overwrite an existing file. Specifies a text file transfer.
Line terminators are converted to the appropriate format.
DESCRIPTION
The mread command copies the specified DOS file to the named UNIX file, or copies multiple DOS files to the named UNIX directory.
DOS subdirectory names that contain the '/' or '' separator are supported. If you use the '' separator or wildcards, you must enclose
file names in quotes to protect them from the shell.
The mcd command can be used to establish the device and the current working directory (relative to DOS), otherwise the default is A:.
RESTRICTIONS
Unlike DOS convention, the destination directory may not be omitted.
EXIT STATUS
The following exit values are returned: Success. Failure.
ENVIRONMENT VARIABLES
The following environment variables affect the execution of mread: If set, this variable names the file that contains the name of the cur-
rent mtools working directory as established by the mcd command. If this variable is not set, the file $HOME/.mcwd is used.
FILES
Contains the name of the current mtools working directory as established by the mcd command. If this file does not exist, the default
mtools working directory is A:. Executable file
SEE ALSO
Commands: dos2unix(1), mcd(1), mcopy(1), mdiskcopy(1), mtools(1), mtype(1), mwrite(1), unix2dos(1)mread(1)