A commandline utility to find files and directories.

learn more… | top users | synonyms (1)

0
votes
2answers
41 views

How to select a directory with the highest version?

Let's say I have three directories within my current working directory. Each one refers to a different version of a library/package. I would like to return only the directory with the highest ...
3
votes
3answers
66 views

Move files from specifically named folders / move files up one level

The goals is to move files out of the lowest level folder, back up one directory. This does a great job but moves files higher up the folder hierarchy as well. find . -name '*.jpg' -type f -execdir ...
1
vote
1answer
16 views

Recursively Extract all 7z

I have many 7z archives nested in many subfolders, and want to extract all these archives into the folders in which they reside, then delete the original archives. I have found how to do this, while ...
3
votes
1answer
39 views

How to show all files created on a specific date

On 16/05/2015 at 17:18 I visited a malicious website. And I suspect a drive-by-download, so I want to check my machine to see since that time in order of creation which files have been created or ...
9
votes
2answers
564 views

Piping to “type” command

I want to find out the type of several commands. Is it possible to pipe or xargs a search result from find into the type command in Linux? For example: find . -name anacron | type or find . -name ...
1
vote
1answer
27 views

Search specific word inside document using ssh [duplicate]

Currently i have to analize some big files looking for a espefic word in .css located on my /var/www/ located on ubuntu server (ssh). There a way to make something like Ctrl+f in windows ...
1
vote
2answers
188 views

How can I use “find” in a shell script to search from the current directory?

I want the program to look like this : read a if[ find . name $a ]; then echo "You found the file" else "You haven t found the file" fi
1
vote
1answer
29 views

How to update the multiple files without changing file date?

I have replaced word 'merchant' to 'capital' in files founded in the current directory using following command: find * -type f -exec sed -i -e 's/merchant/capital/g' {} \; but above command will ...
-2
votes
2answers
35 views

Command to list only output files of gcc operation? [closed]

I have a directory with many c programs and some other files. After performing gcc -o output_name filename.c on c files i have respective output files in the same folder. What terminal command and ...
0
votes
0answers
57 views

find only works with sudo?

I've been searching for a while now and I can't find an awnswer to this. Let's assume I created this dir /Desktop/things and I want to find it using find. If I do find . -name things -type d ( and ...
3
votes
2answers
46 views

locate command finds a file's path, but the file does not exist in that path [duplicate]

I have written: locate Origin90SR2DVD.iso And I received the path where that file is located: /home/david/Origin90SR2DVD.iso Then I have written: cd /home/david I have run: ls -lrth And ...
5
votes
2answers
38 views

Why using the '-execdir' action of find command is insecure for directory which is included in the PATH environment variable?

As title shows, why this is insecure to using the combination of -execdir action of find while using -exec is'nt? When I want to run the below command I'm getting the following warning/stop: ...
3
votes
6answers
503 views

command to find files by searching only part of their names?

Say there are files with names: batman.c batwoman.c batgirl.c cricketbat.c What command and how should I use it to list all these files by using the searchtag bat?
2
votes
2answers
31 views

Advanced text replacement

How can I replace a text in all files in all subfolders when my search includes "*" for example I have many text files containing such pattern (some wrong paths that I want to correct) ...
3
votes
3answers
130 views

changing from user to Superuser

How do I change from user to superuser (root)? What command do I use in the Terminal to switch to root? I have tried --help but I get lost with all the listed help. I'm looking for a recent ...
-3
votes
2answers
38 views

What does this mean in my program? -exec ls -s {} [duplicate]

-exec ls -s is part of my program just want to know what does -s {} mean. This is my whole program, I know what it does: find $root -type f -exec ls -s {} \; | sort -n | tail -n 15 >> ...
0
votes
1answer
29 views

Need a script to find files modified in the last three days and exclude all backup folders

I'm trying to set a script to let me know what WordPress files have been modified in the last 3 days, but I get a huge list of every site's backups when I just run: find /var/websites -mtime -1 How ...
4
votes
2answers
261 views

How can I batch rename filenames in the console

I have a great number of files whose name is "img800400_497708.307247.png", and I would like to change all dots (periods) to an underscore using the console. How can I do that?
1
vote
2answers
329 views

“find: missing argument to `-exec'” when using “-exec rm -f {}\”

I run this command: ~/shell_temp$ find . -type f -name "IMAG1806.jpg" -exec rm -f {}\ i got output below: > IMAG1806.jpg Error: find: missing argument to `-exec' what is exact command for ...
9
votes
3answers
679 views

How to list files older than a day with “2015” in filename?

I want to list all the log files which do not belong to today and only the files that contain 2015 in their names. These are the commands I have tried: find . -name 2015 -mtime +1 -exec ls -ltrh ...
1
vote
1answer
89 views

How to rename a file using find command

I am trying to rename a file using find command. I am trying to rename file-a to file-10. To do this I first tried below command: sps@sps-Inspiron-N5110:~$ find ~ -type f -name test-a -exec mv ...
0
votes
1answer
26 views

Pipelining and xargs

I am trying to delete some .class file from a directory. So first I have tired to count the available .class file using the following command (after going to the directory) - $ find . -name *.class ...
-1
votes
1answer
26 views

Find directories and create new sub directory inside each directory found

I need to insert a file to a sub new directory that I will create when find command is executed. # find /home/user*/.dir/anotherdir -maxdepth 1 -type d -iname "*.default" anotherdir/dwwcop9o.default ...
0
votes
1answer
32 views

run command on only local mount points

I have a command to filter files with size > 10 MB but want to run it only on local mount points. Currently I have mounted some remote NFS in my system on /nfs so in my search I don't want to ...
3
votes
2answers
86 views

How to stock all files with the same suffix into a table?

i'm making a little shell script and i want to stock all files with same suffix in a table. i want something like that : path=/home/user/Documents suffix="_suffix.txt" and then a function that ...
0
votes
3answers
73 views

Using find to search for files containing a word

I want to use the find command to find all files on the system that have the word fsck. I tried find / -iname fsck and it started to search files but everything was permission denied. When I try ...
1
vote
6answers
497 views

How to open a found file with vi? Piping 'find' output to vi [duplicate]

I have a file, /home/user/important.txt. To find it, I use: find /home/user -type f -name 'important' Then, I want to open the file in the Vim editor using a pipe. How can I do this? Something ...
2
votes
1answer
32 views

Find the files of a particular user or group

How can I search the files based on the owner or group in command line? Right now I have tried ls -lR, that gives all the details of files in sub directories also, and I needed to manually search ...
3
votes
1answer
48 views

Lubuntu updatedb.locate may scap bind mounted nfs file systems

I noticed that cron.daily that run updatedb.locate was talking very long to complete (if ever completing). I have interrupted last run with find taking more than 16 hours of CPU time. After ...
3
votes
2answers
534 views

Using busybox's find to delete recursively some files

How can I find and delete all .jpg? -delete doesn't seem to work... [/share/Multimedia/Music] # find . -name '*.jpg' -delete BusyBox v1.01 (2015.01.25-18:47+0000) multi-call binary Usage: find ...
0
votes
1answer
32 views

How to find all files with the same extension within a directory in parallel

I want to grep files with a specific extension. I know how to do it using find command as blow: find . -type f -name "*.pptx" I am wondering if I can do above command in parallel (using more CPU). ...
2
votes
2answers
96 views

How to use 'if' inside '-exec' attribute of 'find'?

I have a directory with many pairs of files. Each non-text file has a textual description partner. For example a directory can look like this: a.jpg a.jpg.text b.ogv b.ogv.text cd ef.JpG cd ...
-4
votes
3answers
740 views

find all headers file begin with vowels in /usr/include

I need to find all headers from /usr/include that begin with vowels (a,e,i,o,u) Example: acpi.h aclinux.h ah.h ... I don't know how to do it , I tried something with grep but I didn't make it ...
1
vote
1answer
42 views

Finding files in sub directories

Still a newbie. Using a clean machine, purchased from System 76 with Ubuntu 14.04 LTS installed. Got it mid-May of 2014. Why can't I find files in the current and its subdirectories? I've tried ...
0
votes
0answers
68 views

lvm VG on boot disk (array) not found with vgdisplay but VM VG seen

I have weird problem with VM server and two raid arrays: OS is installed /dev/sda (raid-5 array) with vg-disk (group?) with id vg_server1 which is created during installation. Later on there is ...
1
vote
1answer
35 views

find command is not working properly

When I run the command find -L /home/yabir/Descargas/ -mtime 0 -mtime -12 to find for the files that have been modified 12 days before today in the Descargas folder I get nothing. I have this folder ...
0
votes
1answer
62 views

How to effectively find all PDF's on disk and copy to one folder?

I have a removable disk via usb connected to my laptop with Ubuntu. I want to find all PDF's on that additional disk and copy them all to a folder in my home directory. Is there a quick and easy way ...
0
votes
1answer
27 views

kubuntu find not working properly in home directory

Opening a terminal in my home directory, the following commands yield no results: ~$ find . -name 'mysql' ~$ find ./ -name 'mysql' ~$ find /home/username/ -name 'mysql' but if I chdir to my local ...
20
votes
1answer
800 views

What is the difference between using '+' and '\;' in -exec command?

I'm wondering to know that what difference is the between using + and \; at the end of -exec command when I use in find command? find .... -exec ... \; VS find .... -exec ... +
1
vote
0answers
28 views

Is there a way to view passwords in plaintext? [duplicate]

I need to figure out a password, but I'm not supposed to change the password itself. Is there anyway, perhaps through the common-password file or a command to show the plaintext password of a user?
0
votes
1answer
39 views

list alphanumerically but hidden first

Is there any Combination of OPTION possible with ls which (in UBUNTU 14.04) For ease, I took below annotation to let you tell the situation H == Hidden directories (folder) and hidden files (name ...
0
votes
2answers
166 views

Find and execute multiple scripts in parallel

G'day, I have tried to solve this problem all morning but have not had success. I would like to search for certain scripts in a particular folder and execute them all in parallel. The scripts have ...
0
votes
1answer
66 views

Trying to organize files by extension using a script (grep, for, foreach, find), but I'm overwhelmed. Looking for advice [duplicate]

I want to iterate through all files in the Source directory and stick them into the Dest directory. Example list of files: /source/folder/text.txt /source/folder/document.pdf ...
2
votes
1answer
123 views

Find not removing files in folders through bash script

I'm very new in bash scripting and I'm really stuck on the find method from Ubuntu. I want to search in the folder /opt/ for all folders to see if they are older than a specific date. If they are ...
2
votes
1answer
144 views

Shell script to move all images excluding ones with size in name using find?

I have a server backup of a WordPress site that has about 1000 images in the uploads directory. When an image was uploaded through WordPress it would create multiple sizes of the image such as: ...
0
votes
1answer
83 views

Can a directory's mtime be older than that of file inside?

I have this very silly and very basic question but I thought better to ask before I start pruning my NAS. I want to delete all directories in which all files are older than 30 days. For files I ...
0
votes
1answer
85 views

Use find command but exclude certain directories [closed]

I am trying to run the make command, but it says make: *** No targets specified and no makefile found. Stop. After doing some research, it seems that the error is because I need to run ./configure ...
0
votes
1answer
226 views

Is there a way to increase upload speed in Ubuntu?

I don't know why my upload speed is so poor. I use adsl connection, and I measured the speed using cable, not wireless. However, the speed is still poor and I was wondering if there is something I ...
1
vote
1answer
56 views

How to filter out hidden files and directories in 'find'?

I would like to list all the non-hidden files and directories in my path. This means that files beginning with . should be excluded from the result, along with files whose path contains a hidden ...
2
votes
2answers
95 views

need to get the line number of a searched string in

find / -name "php.ini" I know I can find the above command to get the exact location of the searched file. I need to find the string oci8 in this file. since I do not have access to the GUI, I ...