A commandline utility to find files and directories.

learn more… | top users | synonyms (1)

3
votes
2answers
167 views

How to run multiple Python files by running one terminal code?

For my text-mining project (with an Enron data set), I have this Python script: from glob import glob import fileinput with open('/media/output/inbox.txt', 'w') as out: for line in ...
0
votes
3answers
47 views

Zip files into weekly archive with week number

I am trying to take a weekly archive of a folder to separate zip files. find . -name '*.txt' -ctime +7 -exec zip "archive-$("date+%Y-%U").zip" {} \; I am stuck on how to name the zip file. Any ...
1
vote
5answers
130 views

Find files belonging to a user with size in MB on Ubuntu 12.04 (Precise Pangolin)

I am using this command which is working fine: sudo find / -user web132 -ls But when I am trying like sudo find / -user web132 -ls -lh I am getting a wrong syntax error. How can I get the file ...
0
votes
4answers
30 views

How to use find quietly?

I want to search for all occurences of <searchterm> on my machine. Now when I perform a search like this find / <searchterm> I can see all the paths the search is running through. How ...
1
vote
3answers
51 views

remove pictures from folder

I want to remove all the photos from a folder and keep the remaining files. I searched in the web and I found a tons of solutions like: find . -type f -name "*.jpg" -delete All the photos are ...
9
votes
5answers
653 views

How do I prevent a folder inside of /tmp from being cleaned up?

This question is about Ubuntu 14.10 on my developer laptop. I've got a folder in /tmp that is used by an application to put temporary stuff in there. This application usually makes a temporary folder ...
2
votes
1answer
83 views

Find and Rename recursively in folders, subfolders and multiple files

I'm new with shellscript and I'm having some problems trying to do what I need... I want to 'optimize' all my *.png images and found this so I made the bash as it says with: #!/bin/bash pngnq ...
2
votes
2answers
36 views

How to list all files in a hard disk with 'find'?

I'd like to list all the files in HDD including size, last modified date and absolute path. idea format : [file size] [last modified date] [absolute path] [ filename] I tried: ls -lhR | awk -v ...
0
votes
2answers
60 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
92 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
35 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
56 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
583 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
31 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
321 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
37 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
42 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
63 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
63 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 ...
4
votes
2answers
60 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
612 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
175 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
55 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
33 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
276 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
662 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
851 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
154 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
34 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
29 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
36 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
92 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
76 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
570 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
36 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
60 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
674 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
37 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
112 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
763 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
73 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
36 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
69 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
29 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
810 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
43 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
187 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 ...