Sponsored Content
Top Forums Shell Programming and Scripting Read filenames in sorted order Post 302594739 by knight_eon on Wednesday 1st of February 2012 05:19:08 AM
Old 02-01-2012
Quote:
Originally Posted by itkamaraj
i guess, -1 (numeric one) in ls command will give sorted order

Code:
ls -1 *.afp

Are you sure? This indeed will give sorted order but on Strings.
Hence,

eon.1, eon.2, eon.3, eon.10, eon.11, eon.99 etc, when passed thru ls -1, the output would be:

Code:
 
eon.1 
eon.10
eon.11
eon.2
eon.3
eon.99


So the above won't work in the current query.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Sorting filenames by order in another file

I would like to arrange /sort filenames ending with suffix like ".00XXXX". where X is a digit. However the order of arrangement is in a text file and is 'harpharzard'. e.g the text file may be like 002345 009807 001145 I wanted to avoid doing this using sql and exporting the text file back to... (4 Replies)
Discussion started by: samudimu
4 Replies

2. Shell Programming and Scripting

How to read filenames with space in between

Hi All, I need to read filenames with space in between in a for loop like Integration of utility projects Integration of hdf projects I copied these files from a windows system and as you know windows filename has spaces in between them. But while unix is reading the filename in a for... (12 Replies)
Discussion started by: dayanandra
12 Replies

3. Shell Programming and Scripting

read list of filenames from text file, archive, and remove

I posted a week ago regarding this scripting question, but I need to revisit and have a few more questions answered.. User cfajohnson was extremely helpful with the archive script, but clarification on my part is needed to help steer the answer in a direction that works in this particular... (5 Replies)
Discussion started by: fxvisions
5 Replies

4. Shell Programming and Scripting

executing code on files in the sorted order -help!

Say i have 2 files in the giving format: file1 1 2 3 4 1 2 3 4 1 2 3 4 file2 1 2 3 4 1 2 3 4 1 2 3 4 I have a PERL code (loaned by one of u -i forgot who - thanks!) that extracts the 2nd column from each file and append horizontally to a new file: perl -ane 'push @{$L->}, $F; close... (1 Reply)
Discussion started by: epi8
1 Replies

5. Shell Programming and Scripting

read line in reverse order from file

dear all i want to read 5th no of line from last line of file. kindly suggest me possible ways. rgds jaydeep (2 Replies)
Discussion started by: jaydeep_sadaria
2 Replies

6. UNIX for Dummies Questions & Answers

numerically sorted filenames

How do you sort filenames: 1 2 3 4 5 6 7 8 9 10 12 13 14 15 16 17 18 19 20 21 as: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 (6 Replies)
Discussion started by: kenneth.mcbride
6 Replies

7. Shell Programming and Scripting

How to read the filenames with space character in it

Hi, My Requirement is to read the filenames which possess space charatcer in it and pass the same file name to the other shell script as input parameter. Please provide your valuable suggestion. (5 Replies)
Discussion started by: cnraja
5 Replies

8. Shell Programming and Scripting

sort the files based on timestamp and execute sorted files in order

Hi I have a requirement like below I need to sort the files based on the timestamp in the file name and run them in sorted order and then archive all the files which are one day old to temp directory My files looks like this PGABOLTXML1D_201108121235.xml... (1 Reply)
Discussion started by: saidutta123
1 Replies

9. Shell Programming and Scripting

Uniq code in sorted order

Hi All, A small question: I have a file check.txt which looks like below: KRPROD2,2012-11-20 08:46:50:408,ODK3325688102 KRPROD2,2012-11-20 08:47:35:289,ODK3325688102 KRPROD2,2012-11-20 08:47:35:446,ODK3325688102 KRPROD2,2012-11-20 08:48:32:973,ODK3325689120 KRPROD2,2012-11-20... (8 Replies)
Discussion started by: irfanmemon
8 Replies

10. UNIX for Beginners Questions & Answers

How to create a summary file of all files in a directory sorted in reverse alphabetical order.?

I have an interactive script which works terrific at processing a folder of unsorted files into new directories. I am wondering how I could modify my script so that( upon execution) it provides an additional labelled summary file on my desktop that lists all of the files in each directory that... (4 Replies)
Discussion started by: Braveheart
4 Replies
SOCKD(8)						      System Manager's Manual							  SOCKD(8)

NAME
sockd - Internet firewall secure socket server (proxy server) SYNOPSIS
sockd [ -ver | -i | -I ] DESCRIPTION
sockd is an internet secure socket server, often referred to as a proxy server. It was designed primarily to provide hosts within a fire- wall access to resources outside of the firewall. Normally, hosts inside a firewall has no IP-accessibility to the network outside of the firewall. This reduces the risk of being intruded by unauthorized people from the Internet. Unfortunately, without IP-accessibility users on the inside hosts can no longer use many of the important tools such as telnet, ftp, xgopher, Mosaic, etc. to access the tremendous resources available in the Internet. With sockd installed on a server host, users on the other inside hosts can gain back the lost functionalities by using clients programs designed to work with sockd proxy server, e.g, rtelnet in place of telnet, rftp in place of ftp, rfinger in place of finger, etc. Since these client programs work like their normal counterparts without requiring direct IP-connectivity to the Internet, convenience to the users is accomplished without breaching the security. The server host that runs sockd does have to be open to the Internet, and it there- fore requires special attention to make sure that it is secure. A configuration file /etc/sockd.fc (or /etc/sockd.conf) is used to control access to sockd and its services. Permission and denial of a service request can be decided based on various combinations of the requesting host, the destination host, the type of service (destination port number), as well as the requesting user. (See sockd.conf(5) and sockd.fc(5).) If the server host is multi-homed, i.e., having more than one network interface and with its IP_FORWARDING turned off, and the server sup- port RBIND operation, then it must run a multi-homed version of sockd, which requires another control file /etc/sockd.fr (or /etc/sockd.route) to decide which interface to use for connection to any given destination host. See sockd.route(5) and sockd.fr(5). A multi-homed sockd can be run on a single-homed host as well if necessary; you just have to set up /etc/sockd.route to direct all traffic through the host's one and only network interface. sockd uses syslog with facility daemon and level notice to log its activities and errors. Typical lines look like Apr 11 08:51:29 eon sockd[636]: connected -- Connect from don(don)@abc.edu to wxy.com (telnet) Apr 11 09:24:59 eon sockd[636]: terminated -- Connect from don(don)@abc.edu to wxy.com (telnet) Apr 11 09:24:59 eon sockd[636]: 1048 bytes from abc.edu, 285143 bytes from wxy.com Jun 22 18:24:54 eon sockd[884]: refused -- Connect from sam(unknown)@big.com to small.com (ftp) In these lines, the first user-id is the one reported by the client program, the second one (within the parentheses) is what is reported by identd on the client host. These log lines usually appear in file /var/adm/messages though that can be changed by modifying /etc/sys- log.conf. (See syslogd(8) and syslog.conf(5).) If you allow access to infosystems such as Gopher or WWW, you should be aware that they by nature would tend to get connections to hosts all over the world and would use not only Gopher and WWW ports but possibly also ports for finger, telnet, ftp, nntp, etc. as well as non- privileged ports ( > 1023). For a stand-alone sockd, /etc/sockd.fc (or /etc/sockd.conf) and /etc/sockd.fr (or /etc/sockd.route), if required, are only read and parsed once at the beginning of program execution. If you change the contents of either file and want to make the running sockd use the new con- tents, you must send a SIGHUP signal to the running sockd process. Sending a running stand-alone sockd a SIGUSR1 signal causes it to record on the systems's log file the effective contents of configuration and route files that it is currently using. You can find the process id of the stand-alone sockd in /etc/sockd.pid. Rather than using plain-text configuration file /etc/sockd.conf and route file /etc/sockd.route, sockd now looks for the corresponding frozen files /etc/sockd.fc and /etc/sockd.fr first. The plain-text files are used only if the corresponding frozen files are not found. Use commands make_sockdfc and make_sockdfr to produce the frosen files. Use commands dump_sockdfc and dump_sockdfr to examine the contents of frozen files. (See make_sockdfc(8), make_sockdfr(8), dump_sockdfc(8), and dump_sockdfr(8).) Using frozen configuration and route files can save a lot of overhead at start-up of sockd. OPTIONS
The options are mutually exclusive and thus may only be used one at a time. -ver With this option, sockd prints its own version number, the version number of the SOCKS protocol, whether it is SOCKSified, whether it is a standalone daemon or must be run under inetd, whether it support RBIND, and whether a route file is required. -I Use identd (RFC 1413) to verify the requester's user-id. Deny access if connection to client's identd fails or if the result does not match the user-id reported by the client program. Client hosts without a properly installed identd daemon will not be served. User verification is done before and in addition to the normal access control. This can be overridden in the sockd.conf file on a line by line basis. -i Similar to -I but more lenient. Access is denied only if client's identd reports a user-id that's different from what the client program claims. This can be overridden in the sockd.conf file on a line by line basis. Log entries similar to the following are produced upon failure of user-id verification: Apr 15 14:42:51 eon sockd[729]: cannot connect to identd on big.edu Apr 15 14:42:51 eon sockd[729]: refused -- Connect from bob(unknown)@big.edu to xyz.com (ftp) Jul 15 12:23:06 eon sockd[832]: *Alert*: real user is sam, not jim Jul 15 12:23:06 eon sockd[832]: refused -- Connect from jim(sam)@abc.org to bad.place.com (WWW) FILES
/etc/sockd.fc, /etc/sockd.conf, /etc/sockd.fr, /etc/sockd.route, /etc/inetd.conf, /etc/services, /var/adm/messages, /etc/syslog.conf SEE ALSO
socks_clients(1), sockd.conf(5), sockd.route(5), socks.conf(5), make_sockdfc(8), make_sockdfr(8), dump_sockdfc(8), dump_sockdfr(8) AUTHOR
David Koblas, koblas@sgi.com Ying-Da Lee, ylee@syl.dl.nec.com David Mischel, dm@kansas.gene.com June 6, 1996 SOCKD(8)
All times are GMT -4. The time now is 09:44 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy