Sponsored Content
Full Discussion: finding file in a directory
Top Forums UNIX for Dummies Questions & Answers finding file in a directory Post 60909 by bhargav on Monday 24th of January 2005 09:46:25 PM
Old 01-24-2005
yes ! you can ...

Code:
$ find $HOME -name *ex1.sh*
/home/bhargav/scripts/abc/ex1.sh
/home/bhargav/scripts/ex1.sh

 

10 More Discussions You Might Find Interesting

1. Programming

Finding largest file in current directory?

I was hoping to get some assistance with this C program I am working on. The goal is to find the largest file in the current directory and then display this filename along with the filesize. What I have so far will display all the files in the current directory. But, how do I deal with "grabbing"... (1 Reply)
Discussion started by: AusTex
1 Replies

2. UNIX for Dummies Questions & Answers

Finding the lowest sequenced file in a directory?

Hello, I have three files in a directory: 1_700_123456.lst 1_701_123456.lst 1_702_123456.lst I am trying to use a command via ksh that will list the file that has the lowest number in the second node and put that to a file. In the example above, it would put 1_700_123456.lst... (2 Replies)
Discussion started by: stky13
2 Replies

3. Shell Programming and Scripting

Finding the oldest file in a particular directory

Hi all, I am a newbie to scripting and I need your help regarding finding the oldest file in a particular directory. My intention is to remove that oldest file. Are there any options available with the "find" command to do this.. Thanks in advance for your help Pavan (4 Replies)
Discussion started by: pavan_movva
4 Replies

4. Shell Programming and Scripting

Finding all the files in a directory

I need to find all the files with a given file name present in the sub directories and execute a script on each file For example In the directory source , I need to find all the files named test and execute the script run.sh Can anyone please help me on this (4 Replies)
Discussion started by: prav076
4 Replies

5. UNIX and Linux Applications

Finding the oldest file in a directory without ls

I am trying to determine the oldest and most recent files in a huge directory. I am using an ls -tr statement outside my find statement. The directory is too big and I am getting an "arg list too long" error. Is there something I can put in my find statement that doesn't create a list to... (2 Replies)
Discussion started by: hiyofjord
2 Replies

6. UNIX for Dummies Questions & Answers

Finding file in a directory structure + move

Hi All, im a new guy if it comes to Unix. I am trying to auto categorize Nzbget downloads the most basic way. I already manage to find files within the directory i'm at and move them with if check to a certain dir. Unfortunately this command is restricted to the directory i'm at and does not... (2 Replies)
Discussion started by: RoxXxoR
2 Replies

7. UNIX for Dummies Questions & Answers

[Solved] Finding the latest file in a directory

Hi All, I am using the below command to find the latest file in a dir: ls -tr $v_sftphomedir/$v_sourcefile |tail -1 or ls -t1 $v_sftphomedir/$v_sourcefile |head -1 and the outpur returned is below: /home/cobr_sftp/var/controllingload/Backup/Dbrwds_Div_1796050246.txt I need only the... (5 Replies)
Discussion started by: abhi_123
5 Replies

8. UNIX for Dummies Questions & Answers

Finding new file, but excluding directory..

hi, I need to find files that have been created less than 3 days ago. However, I need to only search specific directories. I've searched about the net and found some useful commands such as : find . -type d -name 'dir_to_exclude' -prune -o -print -mtime -3 however I cannot get it... (2 Replies)
Discussion started by: horhif
2 Replies

9. Debian

Finding out size of sub-directory

Hi, Is there a way to find out the size of a sub-directory? Eg subidrectory in main directory /data, like this : /data/solr-5.3.1. When I do a df -h /data/solr-5.3.1, it still gives the size of /data: root@L28condor:/data/solr-5.3.1# df -h . Filesystem Size Used... (1 Reply)
Discussion started by: anaigini45
1 Replies

10. Shell Programming and Scripting

Finding the file name in a directory with a pattern

I need to find the latest file -filename_YYYYMMDD in the directory DIR. the below is not working as the position is shifting each time because of the spaces between(occuring mostly at file size field as it differs every time.) please suggest if there is other way. report =‘ls -ltr... (2 Replies)
Discussion started by: archana25
2 Replies
PERLCN(1)						 Perl Programmers Reference Guide						 PERLCN(1)

NAME
perlcn - 1/4oIaODIA Perl O,AI DESCRIPTION
>>9|OA'u1/2 Perl uAIiuO! 'O 5.8.0 oaecaE1/4, Perl 3/4B+-,AEIeEAEuA Unicode (I3O>>Ae) OSO(R), O2A~'oOSO(R)AEDi9|aA9|iOiIuOOIauA+-aAe.1/2E1/2; CJK (ODEOo<<) +-aECAEaODuAO>>2c.Y. Unicode EC1u1/4EDOuA+-ex1/4, EOI1/4o,CEA1/2cEIEuODuAxO.u: I-:-.1/2EA1/2c, 9|<<.1/2EA1/2c, OO1/4oA1/2OB1/4auAO>>CD (ILAoIA, DoAuNCIA, NCA2(R)IA, IL2(R)A'IA, Oi9|EIA, OiuOo2IA, uEuE). EuO2EYAEAE9|aOOx-:-OuIuI3OeAE1/2I" (Ec PC 1/4oAo1/2oEb). _ Perl +-3/4EiOO Unicode 1/2oDD2Ux-:-. Oa+-iE3/4 Perl AU2cuAxO.u'(R)Ey3/4YcEOA Unicode +-iE3/4; Perl uAo E1/2OeEa.u (AyEcOy1ae+-iE3/4E1/2+-E9|O) O2AU9|O Unicode 1/2oDD2Ux-:-. OUEaEe1/4oEa3oE+-, IaAE'|AiOO Unicode O(R)CouA+-aAe.1/2E1/2'ae.AuAEy3/4Y, Perl Ia1(C)AE Encode Oa,oALce, cEOOEAAaCaOxuO9|AEi1/4oD'Ee3/4EODuA+-aAeEy3/4Y. Encode NOEiALceOSO(R)IAAD1/4oIaODIAuA+-aAe.1/2E1/2 ('gb2312' +-iE3/4 'euc-cn'): _ euc-cn Unix NOEixO.u1/4 , O23/4IECEx3AEuA1u+-eAe gb2312-raw I'3/4'|AiuA (uI+-EIO) GB2312 xO.u+-i gb12345 I'3/4'|AiuAOD1uOA.+-IaODIA+-aAe iso-ir-165 GB2312 + GB6345 + GB8565 + DAOoxO.u cp936 xOAeO3 936, O2cEOOOA 'GBK' (A(C)3a1u+-eAe) O,A-:- hz 7 +-EIOOY3oE1/2 GB2312 +-aAe 3/4UAyA'Eu, 1/2<< EUC-CN +-aAeuAuuo,xa3E Unicode, ioDe1/4uEeIAADO,Ai: perl -Mencoding=euc-cn,STDOUT,utf8 -pe1 < file.euc-cn > file.utf8 Perl O2AU,1/2AE "piconv", O>>OSIeE<<OO Perl D'3EuAxO.uxa>>>>1x3/4B3IDo, OA."EcIA: piconv -f euc-cn -t utf8 < file.euc-cn > file.utf8 piconv -f utf8 -t euc-cn < file.utf8 > file.euc-cn AiIa, AuOA encoding ALce, AacEOOCaOxD'3oOOxO.uIauYI>>uA3IDoAe, EcIAEuE3/4: #!/usr/_in/env perl # AEo9| euc-cn xO'(R)1/2aIo; +-ex1/4Ea3oEe1/4o+-ex1/4'iIo9|1/4EeIa euc-cn +-aAe use encoding 'euc-cn', STDIN => 'euc-cn', STDOUT => 'euc-cn'; print length("AaeIO"); # 2 (E<<OyoA+-iE3/4xO.u) print length('AaeIO'); # 4 (uYOyoA+-iE3/4xO1/2U) print index("x>>x>>1/2I>>a", ">>x>>1/2"); # -1 (2>>ouo~'ExOxO.u'(R)) print index('x>>x>>1/2I>>a', '>>x>>1/2'); # 1 ('OuU9|b,oxO1/2UcaE1/4) OUxiooO>>ADAyxOAi, "x>>" uAuU9|b,oxO1/2UOe "x>>" uAuUO>>,oxO1/2U1/2aoI3E EUC-CN AeuA ">>x"; "x>>" uAuU9|b,oxO1/2UOoOe "1/2I" uAuUO>>,oxO1/2U1/2aoI3E ">>1/2". Oa1/2a3/4oAEOOCo EUC-CN Ae+-E9|O'|AiEI3L1/4uuAIEIa. 9|iIauAODIA+-aAe Ec1uDeOa,u9|auAODIA+-aAe, cEOO'O CPAN (<http://www.cpan.org/>) IAOO Encode::HanExtra ALce. EuAcCoIa1(C)IAAD+-aAe.1/2E1/2: gb18030 A(C)3a1yuA1u+-eAe, ouo~.+-IaODIA AiIa, Encode::HanConvert ALceOoIa1(C)AE1/4o.+-xa>>>>OAuAA1/2OO+-aAe: big5-simp Big5 .+-IaODIAOe Unicode 1/4oIaODIA>>Yxa gbk-trad GBK 1/4oIaODIAOe Unicode .+-IaODIA>>Yxa EoIeOU GBK Oe Big5 O(R)1/4a>>Yxa, Ce2Ic1/4,AALceAU,1/2uA b2g.pl Oe g2b.pl A1/2OS3IDo, >>oOU3IDoAUE1OAIAADD'.": use Encode::HanConvert; $euc_cn = big5_to_gb($big5); # 'O Big5 xaIa GBK $big5 = gb_to_big5($euc_cn); # 'O GBK xaIa Big5 1/2oO>>21/2uADAIc Ce2Ic1/4 Perl AU,1/2uA'oAcEuA-:-IA1/4b (2>>DOE<<ECOAOcIAD'uA), A'NSIo,u9|a1OOU Perl uAOaE9|, OO1/4o Unicode uAE1OA.1/2E1/2. 2>>1y, Ia2cuAxEO'Iau+-.a,>>: Ia1(C) Perl xEO'uAIoO. <http://www.perl.com/> Perl uAExO3 (OEA.A3An1<<E3/4I~>>x) <http://www.cpan.org/> Perl xUoIua2OIo (Comprehensive Perl Archive Network) <http://lists.perl.org/> Perl OEuYAUI3O>>AA NSIo Perl uAIoO. <http://www.oreilly.com.cn/html/perl.html> 1/4oIaODIAoaeuAA.A3An Perl Ee1/2a _ Perl E1OAOB1/4 >>a <http://www.pm.org/groups/asia.shtml#China> OD1u Perl IAE1axeO>>AA Unicode Ia1OIoO. <http://www.unicode.org/> Unicode NSEoNS>>a (Unicode +-ex1/4uAOAE9|"OB) <http://www.cl.cam.ac.uk/%7Emgk25/unicode.html> Unix/Linux EIuA UTF-8 1/4o Unicode 'ocIIE SEE ALSO
Encode, Encode::CN, encoding, perluniintro, perlunicode AUTHORS
Jarkko Hietaniemi <jhi@iki.fi> Autrijus Tang (IAExUoo) <autrijus@autrijus.org> perl v5.8.0 2003-02-18 PERLCN(1)
All times are GMT -4. The time now is 07:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy