03-17-2011
Quote:
Originally Posted by
rsheikh
1. stdout does show per dir listing of .log files, however, the last two in iteration also show a ls -l of the directory where this script is saved. Very odd.
I think that means xargs didn't find any arguments and just ran ls -l by itself. -n999 doesn't actually stop this from happening, it only sets a
maximum number of args, so seems a bit pointless.
xargs can also react badly to spaces in filenames since it takes any whitespace as the separator. You can force it to use newlines only with
-d '\n' but the preferred solution, in Linux, would be to use find -print0 and xargs --null. like
find "$DIR" -type f -name "*.log" |xargs ls -l Also note the extra quotes around $DIR. If there were any spaces in it, the quotes would stop it from splitting into two or more arguments.
Last edited by Corona688; 03-17-2011 at 05:10 PM..
This User Gave Thanks to Corona688 For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
i wan to search the file starting with Admin into the directory Output. I am running below command:
find /appl/Output -name "Admin*" -prune
but this command is going into the sub directories present under output. I do not want to search under sub directories. Any help will be highly... (6 Replies)
Discussion started by: Vishal123
6 Replies
2. Solaris
find . -type f -mtime -1 -ls
command not working in sun solaris 5.8 (4 Replies)
Discussion started by: navjotbaweja
4 Replies
3. Shell Programming and Scripting
i have a list of files below:
rwxrwxrwx 1 pipe pipe 180 Mar 4 22:47 del_0n_Date
-rwxrwxrwx 1 pipe pipe 472 Mar 4 22:58 mail_Check
-rw-r--r-- 1 pipe pipe 92 Mar 4 22:58 minfo.txt
-rwxrwxrwx 1 pipe pipe 609 Mar 5 05:12... (6 Replies)
Discussion started by: ali560045
6 Replies
4. Shell Programming and Scripting
In shell we can find the status of last executed command by $?
In perl what is the command to find the status of last executed command...
Can any one please say???????????????
Thanks,
Prabhu (1 Reply)
Discussion started by: prsampath
1 Replies
5. Shell Programming and Scripting
I am trying to copy 2 types of files so I can archive them. I tested with a set of commands:
touch -t $(date -d "-60 day" +%Y%m%d) WORKDIR/REF
find TARGETDIR/ -type f -maxdepth 1 -iname \*.out\* -or -iname \*.log\* ! -newer WORKDIR/REF -exec ls -l {} \;
This correctly lists any files in the... (2 Replies)
Discussion started by: prismtx
2 Replies
6. Shell Programming and Scripting
Hi
for today i have 10 files, in that i need search some values how can i write a find cmd with
perticular date
thanks
SAIC (4 Replies)
Discussion started by: saic
4 Replies
7. Shell Programming and Scripting
Hi All,
My target is to find the biggest files opened by any process and from that i have to find process id and the corresponding file also to avoid file system being hung-up.
Finding the process id: is to kill the process
Finding the biggest file: is to remove the file
To get the process... (0 Replies)
Discussion started by: Arunprasad
0 Replies
8. Shell Programming and Scripting
/usr/bin/find $SEARCH_DIR -daystart \( \( -name 'KI*' -a -name '*.csv' \) -o -name '*_xyz_*' \) -mtime $DAYS_AGO -printf %f -printf "\n" | sort -r > $FILES
The above command gives different results when run on a cron job. When run manually the result is accurate. (2 Replies)
Discussion started by: nuthalapati
2 Replies
9. UNIX for Dummies Questions & Answers
Hello,
I'm having a trouble with the find cmd.
I would like to find all the java versions on my systems.
I have solaris 9 & 10 RHEL and SUSIE.
java -version
doesn't give all the versions on the server.
So I am trying to use the find command to find them all
find / -name java
I would... (7 Replies)
Discussion started by: bitlord
7 Replies
10. UNIX for Advanced & Expert Users
Hi. Can somebody tell me if there's a way of creating a symbolic link from a directory on one filesystem to that on another that will allow a find command that doesn't use the -L param to locate a particular file under that new 'linked' dir. With a normal sym link the find command on that... (6 Replies)
Discussion started by: user052009
6 Replies
pppoesd(1M) pppoesd(1M)
NAME
pppoesd - PPPoE (Point-to-Point Protocol over Ethernet) server daemon
SYNOPSIS
config-file] debug-level] log-file]
DESCRIPTION
performs the server side discovery phase functionalities of PPPoE as mentioned in RFC 2516. The daemon responds to PADI and PADR packets
from clients if it can offer services desired by the client. generates a unique session-id for every client that it services. It then
forks a daemon which performs the session phase functionalities of PPPoE as mentioned in RFC 2516.
Options
supports the following command-line options:
Specifies the configuration file with absolute path
to be used by The default configuration file is
Specifies the debug level at which logging has to be
enabled. The three debug levels are:
Logs all error messages.
To log these messages, type on the command line.
Logs all warning messages.
To log these messages, type on the command line.
Logs function level debug messages.
To log these messages, type on the command line.
Specifies the log-file with absolute path to which
logs messages. The default log file is
EXAMPLES
An example usage of is as follows:
WARNINGS
Note that, you cannot run without the file. See pppoesd.conf(4) for more information.
AUTHOR
was developed by Hewlett-Packard.
FILES
PPPoE client
PPPoE relay
PPPoE server configuration file
PPP daemon
SEE ALSO
pppd(1), pppoec(1), pppoerd(1M), pppoesd.conf(4).
pppoesd(1M)