0
votes
2answers
48 views

Compute folder size for a given file extension only

I have a folder containing all my PHP projects, I'd like a command that would output the folder size of each project but only for the *.php files inside it. Ideally the output would be something like ...
2
votes
3answers
52 views

How to list all properties of folders

How to list the properties of folders in a directory. Like, I want to 'find ./ -type d' and at the same time 'll' them.
0
votes
2answers
43 views

Find and exec in found folder

I'm trying to find files containing *.nef and move them to a subdirectory name NEF of the folder in which the file is found. I've started testing with the following command, but this always copies to ...
0
votes
2answers
38 views

Terminal - Search entire directory for keyword

I am working on a Ruby on Rails project so I have to manage multiple files. I think I made a syntax mistake somewhere but I'm not sure well. It would be awesome if I could search for a keyword through ...
-1
votes
4answers
166 views

how to find a word in text files from a directory [duplicate]

Suppose that I have a directory with name _file and includes two sub directory like _1 and _2 and on each one I have some text files. I want to search a word like foo in one of these text files. How I ...
0
votes
1answer
63 views

Find directory and delete it's content but not itself

How do I find a directory and delete all it's content but not the directory itself? find -type -d -name 'Tmp' -exec rm -rf {} \; But this also deletes 'Tmp' directory. Thanks in advance.
1
vote
2answers
59 views

Find out where the directory is in Linux?

When I executed the command to give the pid of my processes running, it gave me like this - user@machineA:/$ ps -eo pid,command | grep exhibitor | grep java | grep -v grep 1615 java -jar ...
1
vote
3answers
153 views

Find directories that DON'T contain a file but YES another one

I have quite a large music collection and would like to find the directories in which I still have compressed files (*.rar) unprocessed. Hence looking for a command that lists directories in which i ...
2
votes
1answer
126 views

React to a modified directory

In linux everything is considered as file, Now if I want to find only folders/directories not the files then how can i do that? I am getting all the modified files with the following command. find ...
2
votes
1answer
4k views

Search for a string recursively whilst in current directory

I want to search all files recursively from the directory I am in for a particular string. I tried grep -r -i my_string and I tried it in a test folder with two tiny files but it wouldnt find the ...
9
votes
3answers
93k views

find a file using the terminal

I am trying to find a directory, using the terminal and I am not sure where it is. I mean that i used the wget command to obtain the file and used it for installation and now i am not able to find ...
4
votes
1answer
9k views

How to find a folder on my server with a certain name?

I have a directory somewhere on my server wth the name "exampledocs". I tried to find it's location using: ls -d */ | grep -E 'exampledocs' and find * -regextype posix-extended \-regex ...
1
vote
3answers
116 views

Accessing a folder that I can't “name” in the shell

I have a stubborn folder that someone must have created accidentally and that has persisted all this time. I can see it with: # find /var/www/html -maxdepth 1 -type d which gives me: /var/www/html ...
6
votes
1answer
14k views

Find file or directory in whole directory structure

How can I find a file with a specific name in bash. I want to search through the whole system. I tried with find, but that only work through one level.