10 More Discussions You Might Find Interesting
1. UNIX and Linux Applications
Hi All,
I want to search only files more than 60 min in particular directory but not in sub directories.
with this command i am getting even sub directires also.Please and let me know how to get the files.
$i=`find /home/n1013141/vijay -type f -mmin -60`;
print $i;
... (6 Replies)
Discussion started by: bhas1285
6 Replies
2. Shell Programming and Scripting
hi
I used find command to find some file names as per input from user. I used it for current directory. It was working fine. Now I tried with giving some other directory path. Its giving issues.
Here what I tried. Script will take input from user say 1_abc.txt, find the file and print list. if... (1 Reply)
Discussion started by: sukhdip
1 Replies
3. Shell Programming and Scripting
I was trying to move a file to a particular directory. In a hurry i forgot to give the dest directory, as below
mv prod.log
The file disappeared. :confused:
Any idea where it might have moved???
And I have tried moving files based on date from one directory to another as below.... (1 Reply)
Discussion started by: siteregsam
1 Replies
4. Shell Programming and Scripting
I am facing problem in find command. I want to read all file names of a directory and write those names in a text file. My script is
find /home/Pratik/src -type f -exec basename {} \; >> names.txt
The script is working fine and writing all the file names but problem is file names are not... (5 Replies)
Discussion started by: pratikjain998
5 Replies
5. UNIX for Dummies Questions & Answers
Hi,
I have a script below,which reads dates from No_weekandMonthend_dates.txt performs the copy operation.
for i in `cat /tmp/No_weekandMonthend_dates.txt`
do
cd $Gerenimopath/ZH_LP
find . -type f -name "$i_*.txt" -exec cp {} /home/gaddamja/TempLocal \;
cd... (2 Replies)
Discussion started by: jagadish_gaddam
2 Replies
6. UNIX for Dummies Questions & Answers
im a beginner in shell scripting and i need a script which will find a file in a given path without the use of find or grep command.......i need some kind of code.....plzzz plzzzz help me......ive tried n searched every where but i couldn't find the solution for my particular problem..... (4 Replies)
Discussion started by: mishi
4 Replies
7. UNIX for Dummies Questions & Answers
Hi,
I am triying to make sure that there exists only one file with the pattern abc* in path /path/. This directory is having many huge files. If there is only one file then I have to take its complete name only to use furter in my script.
I am planning to do like this:
if ; then... (2 Replies)
Discussion started by: new_learner
2 Replies
8. Shell Programming and Scripting
Hi All,
I am using following find command to delete the records older than 7 days but getting missing conjuction error.Kindly suggest:
The command is:
find <complete_dir_path> \(! -name usr -prune \) -type f -name "*.txt" -mtime +6 -print | xargs rm (11 Replies)
Discussion started by: visingha
11 Replies
9. Shell Programming and Scripting
eg: If I execute an example tail statement to put rows from one file to another, it truncates some of the data.
/carrier>wc -l IntIndA.txt
1918 IntIndA.txt
/carrier>tail -1918 IntIndA.txt > test
/carrier>wc -l test
132 test
The tail command should copy 1918 rows to test file instead of... (4 Replies)
Discussion started by: subbukns
4 Replies
10. UNIX for Dummies Questions & Answers
Hi,
In my current directory, i have the following files:
x1.dat
x2.dat.gz
x3.dat
I want to use the find command and display only files which has *.dat and NOT *.gz extension files.
Please help me out.
Thanks,
Kris Kart. (2 Replies)
Discussion started by: Kris_Kart_101
2 Replies