10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Given a directory containing say a few thousand files,
please output a list of all the names of the files in the directory that are exactly the same, i.e. have the same contents.
func(a_directory_name) output -> {“matches”: , ... ]}
e.g. func(“/home/my/files”) where the directory... (7 Replies)
Discussion started by: anuragpgtgerman
7 Replies
2. Shell Programming and Scripting
Hello :)
I need little help i have following cmd:
this only able to delete files but not folder which contain that file
find /home/test/* -name "*.testfile" -type f -exec rm -i {} \;
how to delete whole directory if file called somethingblahblah.testfile is there?
Thanks you :) (3 Replies)
Discussion started by: ZerO13
3 Replies
3. Shell Programming and Scripting
Hi ,
I'm trying to list the files and output is written to a file. But when I execute the command , the output file is being listed. How to exclude it ?
/tmp
file1.txt
file2.txt
ls -ltr |grep -v '-' | awk print {$9, $5} > output.txt
cat output.txt
file1.txt
file2.txt
output.txt (8 Replies)
Discussion started by: etldeveloper
8 Replies
4. UNIX for Advanced & Expert Users
Hi , Need to shell script to extracts files names and write those to another file in different directory.
input file is
inputfile.txt
abc|1|bcd.dat
123 david123
123 rudy2345
124 tinku5634
abc|1|def.dat
123 jevid123
123 qwer2345
124 ghjlk5634
abc|1|pqr.txt
123 vbjnnjh435
123 jggdy876... (9 Replies)
Discussion started by: dssyadav
9 Replies
5. Shell Programming and Scripting
I need to find empty files in a directory and write them into a text file. Directory will contain old files as well, i need to get the empty files for the last one hour only. (1 Reply)
Discussion started by: vel4ever
1 Replies
6. Shell Programming and Scripting
got it figured out :) (1 Reply)
Discussion started by: sHockz
1 Replies
7. UNIX for Dummies Questions & Answers
Hi,
i have a directory full of pictures, .jpg files. Half of them begin with "beach_" (for ex beach_123_123456.jpg)
i'm looking for a command to remove the "beach_" from all files in the directory.
thanks (4 Replies)
Discussion started by: robertmanalio
4 Replies
8. Shell Programming and Scripting
I'm running on freebsd -- with a default shell of csh.
I have two files named A and B. Each line of each file contains a file name. How can I write a script that removes all the file names in file B from A.
I tried to use perl to create a huge regular expression with "|" separating the file... (2 Replies)
Discussion started by: siegfried
2 Replies
9. AIX
Hi,
I am trying to find the content of file using grep and find command and list only the file names
but i am getting entire file list of files in the directory
find . -exec grep "test" {} \; -ls
Can anyone of you correct this (2 Replies)
Discussion started by: madhu_Jagarapu
2 Replies
10. Shell Programming and Scripting
Hi all,
I have a bunch of files that are named like 12543, 467249877, etc all over some directories.These files are named only with numbers, they dont have any letters or special characters in their file names. Could you please help me out and give me some command/script to remove only those... (6 Replies)
Discussion started by: praveen_indramo
6 Replies