Finding absolute pathnames longer than 100 characters


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Finding absolute pathnames longer than 100 characters
# 1  
Old 05-12-2006
Finding absolute pathnames longer than 100 characters

Please help. This simple problem is really stumping me.

Is there are way to find absolute pathnames for all files on your system that are longer than 100 characters?

I'm using bash shell to attempt it, but have come up with nothing so far.

I appreciate any help offered.

Nauty

Last edited by nauty; 05-12-2006 at 09:17 AM..
# 2  
Old 05-12-2006
I think something like this one-liner may do it, but I have not tested it...

find / -print | while read pn ; do ((${#pn} > 100 )) && echo $pn ; done
# 3  
Old 05-12-2006
Thanks!

Worked like a charm. Thanks a bunch Smilie
 
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Relative Pathnames

Hi, Could anyone help me with the following questions about relative addressing. The questions are: 1) Enter below the command to copy the file basics.pptto the folder outline, using relative addressing. 2) Enter below to move the file .secrets.doc to the folder Day1 using relative addressing.... (1 Reply)
Discussion started by: ml123
1 Replies

2. Shell Programming and Scripting

Finding first 6 characters

Hi , I'm using KSH88 I tried the following example to get the last 6 characters from a string echo 'abcdefghids' | sed 's/.*\(.\{6\}\)$/\1/' What chages i need to do to get the first 6 characters from the string my desired output should be abcdef Thank you (6 Replies)
Discussion started by: smile689
6 Replies

3. Shell Programming and Scripting

Finding distinct characters from flat file

Hi....I need one help.... I'm having a files which is having the data as follows... a b c c d d d e f Now I need to find out distinct characters from this file and the output should be as follows - a b c d e f Can you please help me on this? I'm using KSH script. (18 Replies)
Discussion started by: Krishanu Saha
18 Replies

4. Shell Programming and Scripting

Finding Strings between 2 characters in a file

Hi All, Assuming i have got a file test.dat which has contains as follows: Unix = abc def fgt jug 111 2222 3333 Linux = gggg pppp qqq C# = ccc ffff llll I would like to traverse through the file, get the 1st occurance of "=" and then need to get the sting... (22 Replies)
Discussion started by: rtagarra
22 Replies

5. Shell Programming and Scripting

Search a directory for files that contain pathnames

Hello, I really don't know if this is possible, but I figured the wonderful users of unix.com may be able to provide me with some help/suggestions. I want to create a (bash) script that would go will accept an input file. That input file contains important information as well as pathnames. For... (4 Replies)
Discussion started by: tester213
4 Replies

6. Shell Programming and Scripting

finding junk characters

Hi, Is there anyway to find the junk characters in a file.Consider the file has data as given below: 123|abc^M|Doctor^C #record 1 234|def|Med #record 2 345|dfg^C|Wrong^V #record 3 The junk characters are highlighted and this is a pipe delimited file. Is there anyway to... (20 Replies)
Discussion started by: ashwin3086
20 Replies

7. Shell Programming and Scripting

Finding absolute values greater than a certain value

Hi I am posting here for the first time. I am trying to write a script that reads a data file and tries to determine if any absolute values that are above 0.5 I was thinking it ought to be possible to do this with awk somehow. Are there any suggestions before I start reinventing the wheel? ... (4 Replies)
Discussion started by: jackygrahamez
4 Replies

8. Shell Programming and Scripting

finding characters with new line

I have a file sample.txt with the below contents: Aaa - providioning add || dev - reeec dev kapl || ball - HERO || bal - provisioning pro || for given name i need the output to be the contents between - and || (excluding both) for eg : input - Aaa output -... (10 Replies)
Discussion started by: kinny
10 Replies

9. UNIX for Dummies Questions & Answers

finding exact characters

I want to grep from a file an exact character match. I tried grep -c "$a $b" $file where a=6 and b=2 the problem is that I get: 6 2 and 6 20 I just need a count of the occurrence. I'm using the Bourne shell. I've also tried grep -c '$a $b' $file; not sure how to do this - any suggestions? (3 Replies)
Discussion started by: jrdnoland1
3 Replies
Login or Register to Ask a Question