Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Listing no. of files in UNIX with common prefix name Post 302796165 by hanson44 on Friday 19th of April 2013 03:08:35 AM
Old 04-19-2013
What does the following produce (ell ess):
Code:
ls

 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Recursive directory listing without listing files

Does any one know how to get a recursive directory listing in long format (showing owner, group, permission etc) without listing the files contained in the directories. The following command also shows the files but I only want to see the directories. ls -lrtR * (4 Replies)
Discussion started by: psingh
4 Replies

2. Filesystems, Disks and Memory

Sun UNIX Files & Folders listing

Hi guys, i'm new to UNIX and only know a small amout about it, but have just had some changes at work which now require me to interact with and work on SUN Unix systems often. I have reasonable knowledge of PC's but hope that you will be able to help me with these questions. Part1. I would like... (3 Replies)
Discussion started by: Scrat
3 Replies

3. UNIX for Dummies Questions & Answers

listing executable files in unix.

How to list out the files which are not accessed for the last n days? and How to list out all the executable files in a directory? can anyone help me on the above? Thanks in advance. (3 Replies)
Discussion started by: venkatesht
3 Replies

4. UNIX for Dummies Questions & Answers

compare two files based on common field in unix

I have two files in UNIX. 1st file is Entity and Second File is References. 1st File has only one column named Entity ID and 2nd file has two columns Entity ID | Person ID. I want to produce a output file where entity id's are matching in both the files. Entity File 624197 624252 624264... (4 Replies)
Discussion started by: PRS
4 Replies

5. UNIX for Dummies Questions & Answers

Listing files in a Unix Directory ending with .....

Hi Unix Gurus, I need to list all files in a Unix Directory which either end with a .pdf or .rtf and they should be case insensitive ie .Pdf , .pDF , .RtF etc are also possible. How can i accomplish this with with a ls command ? If not then a find command. (6 Replies)
Discussion started by: pchegoor
6 Replies

6. Shell Programming and Scripting

Finding out the common lines in two files using 4 fields with the help of awk and UNIX

Dear All, I have 2 files. If field 1, 2, 4 and 5 matches in both file1 and file2, I want to print the whole line of file1 and file2 one after another in my output file. File1: sc2/80 20 . A T 86 F=5;U=4 sc2/60 55 . G T ... (1 Reply)
Discussion started by: NamS
1 Replies

7. Shell Programming and Scripting

Common prefix of a list of strings

Is there a simple way to find the longest common prefix of a space-separated list of strings, optionally by field? For example, given input: "aaa_b_cc aaa_b_cc_ddd aaa_b_cc aaa_b_cd"with no field separator, output: aaa_b_cwith _ field separator, output: aaa_bI have an awk solution which... (1 Reply)
Discussion started by: CarloM
1 Replies

8. UNIX for Dummies Questions & Answers

Unix Command for listing files containing one text but not other.

Hi, I want to list all files present in directory those contains one specific word but exclude other. If possible suggest unix commands instead of script to do so. e.g. List all files name from directory which are having "PROMOTION" word but not "LEN_PROMOTION". Thanks (4 Replies)
Discussion started by: gauravgautam135
4 Replies

9. UNIX for Dummies Questions & Answers

Add foldername as prefix to files

Hi there, I am looping through folders in order to rename the files in the current folder. So, given me being a newbie here, I would do that with a for-loop. The renaming per se should be like this: I want to add the folder-name as a prefix to the files in the folder in question. For instance,... (6 Replies)
Discussion started by: jahndavik
6 Replies

10. Shell Programming and Scripting

Extract Uniq prefix from a start and end prefix

Dear All, assume i have a file with content: <Start>6000</Start> <Stop>7599</Stop> the output is: 6000 7000 7100 7200 7300 7400 7599 how should we use any awk, sed, perl can do this task, means to extract the uniq prefixes from the start and stop prefix. Thanks Jimmy (3 Replies)
Discussion started by: jimmy_y
3 Replies
SHAR(1net)							  Wang Institute							SHAR(1net)

NAME
shar - create file storage archive for extraction by /bin/sh SYNOPSIS
shar [-abcmsuv] [-p prefix] [-d delim] files > archive DESCRIPTION
shar prints its input files with special command lines around them to be used by the shell, /bin/sh , to extract the files later. The out- put can be filtered through the shell to recreate copies of the original files. shar allows directories to be named, and shar prints the necessary commands (mkdir & cd) to create new directories and fill them. shar will not allow existing files to be over-written; such files must be removed by the user extracting the files. OPTIONS
-a All the options. The options: -v -c -b -p <tab>X are implied. -b Extract files into basenames so that files with absolute path names are put into the current directory. This option has strange effects when directories are archived. -c Check file size on extraction by counting characters. An error message is reported to the person doing the extraction if the sizes don't match. One reason why the sizes may not match is that shar will append a newline to complete incomplete last lines; shar prints a message that mentions added newlines. Another reason why the sizes may not match is that some network mail programs remove non-whitespace control characters. shar prints a message that mentions control characters to the extractor. -d Use this as the ``end of file'' delimiter instead of the default. The only reason to change it is if you suspect a file contains the default delimiter: SHAR_EOF. -m Reset the exact protection modes of files when they are extracted (using the chmod program). By default, the extractor's default file modes are used, and executable files (e.g., shell scripts) are made executable. -p Use this as the prefix to each line of the archived files. This is to make sure that special characters at the start of lines are not eaten up by programs like mailers. If this option is used, the files will be extracted with the stream editor sed rather than cat so it is more efficient and portable to avoid setting the prefix, though perhaps less safe if you don't know what is in the files. -s Silent running. All checking and extra output is inhibited. -u Archive the input files with the uuencode format for later extraction with uudecode. This will allow you to send files with control characters in them, but will slow down the extracting. You must be sure that the receiving party has access to uudecode. -v Print verbose feedback messages about what shar is doing to be printed during extraction. Sizes of plain files are echoed to allow a simple validity check. SEE ALSO
sh(1), tar(1), cpio(1), tp(1), uuencode(1), uudecode(1) fpack(1) is a plain-file packer useful for UNIX and MSDOS AUTHOR
Gary Perlman (based on a shell version by James Gosling, with additions motivated by many people on the UNIX network: Derek Zahn, Michael Thompson, H. Morrow Long, Fred Avolio, Gran Uddeborg, Chuck Wegrzyn, nucleus!randy@TORONTO, & Bill McKeeman) LIMITATIONS
shar does not know anything about links between files. UNIX User's Manual March 4, 1986 SHAR(1net)
All times are GMT -4. The time now is 09:04 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy