10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
So I'm grepping for the following right now:
ls -la /somedirectory/*.log* | awk '{print $9}'
The problem with this is that I get the following output:
/somedirectory/errors_1_foo.log
/somedirectory/errors_1_foo.log.1
/somedirectory/errors_1_foo.log.2... (4 Replies)
Discussion started by: LinuxRacr
4 Replies
2. Shell Programming and Scripting
Hi,
We are doing some migration work. The same files may exist in different partition/mountpoints. We may place it in a single place, hence we don't want any duplicates...we will rename the file names if we know the files which has duplicates(by file name)).
It would be nice if a script... (3 Replies)
Discussion started by: saravanapandi
3 Replies
3. UNIX for Advanced & Expert Users
OS: RHEL 5.8
shell: bash 3.2.25
Directory /home/guest/ contains these files:
file a
file b
file c
fileD
fileE
fileF
testFile.txt
I'm trying to find the syntax to run ls -ltr against this list of files that is contained within a text file, testFile.txt.
The file testFile.txt has... (4 Replies)
Discussion started by: uschaafm
4 Replies
4. Shell Programming and Scripting
I have some html with hrefs that contain local links to pdf filenames. These filenames should have standardised names, i.e. there should be a label prior to the ".pdf" filename suffix. There can be many of these links on a single line of text and some may already have the label. For example
... (13 Replies)
Discussion started by: adb
13 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I have got some 10 filenames stored in a file or displayed in the console as a result of some query i made.. Now I need to open each of these files and search for a pattern in these 10 files.. Can someone help me with this?
Thanks,
Jean (9 Replies)
Discussion started by: jeanjkj
9 Replies
6. Shell Programming and Scripting
without using conventional file searching commands like find etc, is it possible to locate a file if i just know that the file that i'm searching for contains a particular text like "Hello world" or something? (5 Replies)
Discussion started by: arindamlive
5 Replies
7. UNIX for Dummies Questions & Answers
Hello all,
i have tons of files in folder named like this (yyyymmdd):
bookcollection20100729
bookcollection20100730
bookcollection20100731
bookcollection20100801
bookcollection20100802
etc.
I need to find files with date range in there names lets say from 2010.07.30 - 2010.08.02
... (10 Replies)
Discussion started by: Whit3H0rse
10 Replies
8. UNIX for Dummies Questions & Answers
Hi
I would like to know how to search through a directory and pull out files that has a specific pattern in the filename. For example if the filename has "bsc" in it, then that file must be moved to another directory where I will perform some operations on it. I know grep can be used, but I'm... (17 Replies)
Discussion started by: ladyAnne
17 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I was wondering if there was a way to append something to filenames based on a wildcard. For example, if I have the following files in a directory:
blah1
blah2
blah3
blah4
blah5
I want to rename these all to:
blah1.txt
blah2.txt
blah3.txt
blah4.txt
blah5.txt
Is there a... (4 Replies)
Discussion started by: Djaunl
4 Replies
10. Shell Programming and Scripting
Hi,
I have 5 files in a directory.
emp1_usage.txt
emp2_usage.txt
emp3_usage.txt
emp4_usage.txt
emp5_usage.txt
I am using sqlldr to get the contents of the above 5 files and store it in a temp table and update my original table using temp table.
for f in *emp*.txt
do
sqlldr... (3 Replies)
Discussion started by: pathanjalireddy
3 Replies