07-18-2013
Question on ls and find
Hi,
Is there an option to run ls to only show files owned by the current user? Currently doing ls | awk | grep for the user.
If I use find and -user ${username}, I am getting Permission denied messages on some directories and am currently re-directing those messages as 2>/dev/null. Is that the expected behavior for find when it is searching for files even if I've used -user already?
Any feedback much appreciated. Thanks.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Is it possible for find to match on multiple arg's. Basically, I would like to be able to match on name and atime. Basically I want something like:
find . -atime +31 <AND> -name *.log -exec rm -f {} \;
Thanks (2 Replies)
Discussion started by: 98_1LE
2 Replies
2. UNIX for Dummies Questions & Answers
:D i am looking through the man pages of the find command and I have found the -printf and fprintf section.. .
I tried this command and got an error
find -follow -newer 'date.file' -printf %f file1
i keep getting a %f in directory listing and no input into file1
according to the manpages %f... (2 Replies)
Discussion started by: moxxx68
2 Replies
3. Shell Programming and Scripting
Hi Guys,
Do you know how can I find files with modificatioin time less than 30 MINUTES using the find utility?
Or if u have any other mechanism to find it using script, I'll appreciate it.
Thanks! (5 Replies)
Discussion started by: marlonus999
5 Replies
4. UNIX for Dummies Questions & Answers
I have a file, but I don't know this file is stored in which directory, if I use 'find' command to search this file, is it work?
which option I use?
find filename? (2 Replies)
Discussion started by: wendyz
2 Replies
5. Shell Programming and Scripting
Not sure if I'm missing it, but I'm looking on the find man page, but can't find it.
Here is what I'm doing
find . -name "log_*" -type f -mtime +8 -exec rm {} \;
How do I tell man to find all files matching that pattern, but only ones that end with a numeric character. I thought it was... (4 Replies)
Discussion started by: cbo0485
4 Replies
6. Shell Programming and Scripting
hey guys!
I need to find in a specific directory and its sub-directories a file thats passed has a argument, and print it has like a ls -l command! the problem is how do i print has a ls command but instead only the file name in the end, also the directory where its insered!
ex:
Want... (2 Replies)
Discussion started by: Shinni
2 Replies
7. UNIX for Dummies Questions & Answers
All,
For some reason I can't figure out why I can't wildcard my find statement to check for anything with a wildcard after. I can before the -name but not after.
ie. find . -name *test works
but find . -name test* gives me the error: find: paths must precede expression
Usage: find ... (1 Reply)
Discussion started by: markdjones82
1 Replies
8. UNIX for Dummies Questions & Answers
I was using this find command to search for this string
find /usr/reports -name '*.txt' -type f -exec grep -l tbl_out:add_19 {} \; > /usr/work/junk.txt
My question is, if I want to search another type of file extension besides '*.txt'
how can I include it on the same line to say something... (5 Replies)
Discussion started by: NycUnxer
5 Replies
9. Shell Programming and Scripting
Hi all,
I want to use find to 'find' files older than a file.
The command I have come up with so far is
find . -type f ! -newer filename -print | grep -v filename
If I dont use the -v then the filename is included in the output
is there a better way of formulating this command... (1 Reply)
Discussion started by: jonnyd
1 Replies
10. UNIX for Dummies Questions & Answers
I need to find all files with file names starting with
alert
and ending with
.log
I mean, the following files should be returnrned
alertTST.log
alertabcdefgh.log
How can i do this ? (4 Replies)
Discussion started by: kraljic
4 Replies
TALK(1) General Commands Manual TALK(1)
NAME
talk - talk to another user
SYNOPSIS
talk person [ ttyname ]
DESCRIPTION
Talk is a visual communication program which copies lines from your terminal to that of another user.
If you wish to talk to someone on you own machine, then person is just the person's login name. If you wish to talk to a user on another
host, then person is of the form :
host!user or
host.user or
host:user or
user@host
though host@user is perhaps preferred.
If you want to talk to a user who is logged in more than once, the ttyname argument may be used to indicate the appropriate terminal name.
When first called, it sends the message
Message from TalkDaemon@his_machine...
talk: connection requested by your_name@your_machine.
talk: respond with: talk your_name@your_machine
to the user you wish to talk to. At this point, the recipient of the message should reply by typing
talk your_name@your_machine
It doesn't matter from which machine the recipient replies, as long as his login-name is the same. Once communication is established, the
two parties may type simultaneously, with their output appearing in separate windows. Typing control L will cause the screen to be
reprinted, while your erase, kill, and word kill characters will work in talk as normal. To exit, just type your interrupt character; talk
then moves the cursor to the bottom of the screen and restores the terminal.
Permission to talk may be denied or granted by use of the mesg command. At the outset talking is allowed. Certain commands, in particular
nroff and pr(1) disallow messages in order to prevent messy output.
FILES
/etc/hosts to find the recipient's machine
/var/run/utmp to find the recipient's tty
SEE ALSO
mesg(1), who(1), mail(1), write(1)
BUGS
The version of talk(1) released with 4.3BSD uses a protocol that is incompatible with the protocol used in the version released with
4.2BSD.
4.2 Berkeley Distribution November 27, 1996 TALK(1)