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
Hi all,
I have a directory with multiple (thousnads) of files, which are named this way
ABCDEF.wo.im-1
OKRAME.ire.roi
IOJEAFO01.irt.gfg
IMNYBL05.REG.gkf
I would like to keep the part of the name (everything before the first dot in the filename).
The desired output:
ABCDEF... (3 Replies)
Discussion started by: Error404
3 Replies
3. Shell Programming and Scripting
how can i make find/sed to include directory names with spaces
the command is like this
for i in `find wp-content/themes -type f -print0 | xargs -0 grep -l
-iE 'e'`;do sed -i -e 's/word1/word2/gI' "$i";done
but it skips one directory names with spaces
sed: can't read ./Nova: No such... (5 Replies)
Discussion started by: vanessafan99
5 Replies
4. Shell Programming and Scripting
Hi All,
So I'm new to scripting and I've been put in a position to convert a bunch of files with specific extensions in a folder and all its subfolders to uppercase including their extension. I figure so far I could do something like this:
...
...
and then input $line into another bash... (12 Replies)
Discussion started by: ideal2545
12 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
I would need a command for finding first 15000 of the file names whose 25th postion is 5 in the current directory alone.
I do have this painful command
find . -name '5*' | head -15000 | cut -c3-
please refine this.
Of course the above command also searches in the sub directories... (3 Replies)
Discussion started by: vk39221
3 Replies
8. Shell Programming and Scripting
I have a script that generates a variable with the location of a file and its complete path. What i want to do is to "cd" to the directory where that file is located using the path name of the file. GIS has absolutely failed me.
For example when i run my script it generates a variable called... (1 Reply)
Discussion started by: Knome
1 Replies
9. UNIX for Dummies Questions & Answers
Hey,
I have a WebDav directory mounted and everything seems fine except for one thing. All file/directory names appear in all UPPERCASE, when in actual fact they are lowercase on the remote machine.
For example:
foo/bar/baz.html on the remote host, appears on my local machine as... (0 Replies)
Discussion started by: MrMoney
0 Replies
10. Shell Programming and Scripting
Hi,
how can find length of file names in a directory.
Examp:
I have a directory with name "d1".
directory: d1
files:
aaa.log
bbb.log
abcd.log
abcdef.log
I wold like out put like:
file name legnth
aaa.log 3
bbb.log 3
abcd.log 4
abcdef.log 5 (5 Replies)
Discussion started by: koti_rama
5 Replies