wanted to find both link file and ordinary file using single find command


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting wanted to find both link file and ordinary file using single find command
# 1  
Old 03-20-2012
wanted to find both link file and ordinary file using single find command

Code:
find . -type fl

o/p is only the ordinary file. where in it wont give the link files.

Last edited by methyl; 03-20-2012 at 11:03 AM.. Reason: please use code tags
# 2  
Old 03-20-2012
Code:
find . \( -type f -o -type l \)

This User Gave Thanks to methyl For This Post:
# 3  
Old 03-20-2012
thanks methyl Smilie Smilie
ur awesome SmilieSmilie
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

How to find single file of any task_id?

Hi Guys, I have many files names of single task_id, now we have to find out only file of every task_id, my files is following :- sms_task_id_01-12345.csv sms_task_id_01-12345.csv sms_task_id_01-13345.csv sms_task_id_01-14345.csv sms_task_id_01-14345.csv sms_task_id_02-12345.csv... (12 Replies)
Discussion started by: aaditya321
12 Replies

2. UNIX for Dummies Questions & Answers

To find and display the middle line in a file using single line command.

Hi all, How can i display the middle line of a file using a single line command? (6 Replies)
Discussion started by: Lakme Pemmaiah
6 Replies

3. Shell Programming and Scripting

Find multiple string in one file using find command

Hi, I want find multiple string in one file using find coomand. And keeping it in one variable.grep is not working. (5 Replies)
Discussion started by: vivek1489
5 Replies

4. Shell Programming and Scripting

How to use grep & find command to find references to a particular file

Hi all , I'm new to unix I have a checked project , there exists a file called xxx.config . now my task is to find all the files in the checked out project which references to this xxx.config file. how do i use grep or find command . (2 Replies)
Discussion started by: Gangam
2 Replies

5. Linux

Simplified find command to find multiple file types

Hi, I'm using the following command to find the multiple requierd file types and its working fine find . -name "*.pl" -o -name "*.pm" -o -name "*.sql" -o -name "*.so" -o -name "*.sh" -o -name "*.java" -o -name "*.class" -o -name "*.jar" -o -name "*.gz" -o -name "*.Z" -type f Though... (2 Replies)
Discussion started by: vickramshetty
2 Replies

6. UNIX for Dummies Questions & Answers

How to find .dat file in symbolic link

Hi, I am trying to find all files in a directory that have .dat and .int extensions and removing them. rm -f `find ${MY_DIR} -type f -name '*.dat' -o -name '*.int'` This works fine if $MY_DIR is a regular directory. However when $MY_DIR is a symbolic link then this command fails. How... (1 Reply)
Discussion started by: neeto
1 Replies

7. UNIX for Dummies Questions & Answers

how to find a file named vijay in a directory using find command

I need to find whether there is a file named vijay is there or not in folder named "opt" .I tried "ls *|grep vijay" but it showed permission problem. so i need to use find command (6 Replies)
Discussion started by: amirthraj_12
6 Replies

8. Shell Programming and Scripting

Find the size of a single specific file

As I'm a newbie to UNIX, very newbie in fact, could anyone humour me and tell me how I'd find just the file size in bytes for a specific file? Or at least just the specific line from the ls -a for the file - call it file1 I know this sounds bad but I don't seem to be getting very far at this... (3 Replies)
Discussion started by: nortypig
3 Replies

9. Shell Programming and Scripting

how find the link of the file

Hi, I have a flat file which is used by a program. I dont know the program name .This file is in used by that program which is still running ? Is there any way to find out which program is accessing this file just by knowing the file name? Can we check some thing in "ps" just by knowing only... (8 Replies)
Discussion started by: Manish Jha
8 Replies

10. Shell Programming and Scripting

how to find a file in UNIX without find command?

given a start directory,a filename,how to find it? (3 Replies)
Discussion started by: bluo
3 Replies
Login or Register to Ask a Question