A commandline utility to find files and directories.

learn more… | top users | synonyms (1)

0
votes
0answers
17 views

Why is rsync copying directory structure when my find result only shows me files?

I have an annoyingly complicated find command I've cobbled together that I pipe to rsync with the intention of copying files and syncing new versions. I'm trying to write something that is efficient ...
3
votes
2answers
47 views

Output of running commands in Terminal

I use this line to delete files find . -type f -iname \*.vi -delete and this line to move files find . -name "*.doc" -exec mv {} /path How can I see the process as it happen, I mean I don't ...
1
vote
1answer
27 views

How to find only 'permission granted' files

I'm trying to find files that I'm able to edit, I tried the commands below but still getting 'Permission denied' results. find -name "*.config" | grep -v "Permission denied" find -name "*.config" ...
0
votes
2answers
51 views

find all '&' characters in files and folders

i have a Ubuntu server with samba file sharing. i want to find all files and folders that have '&' in their name an replace it with 'and'. can any one help me on this situation. thank you all i ...
0
votes
2answers
50 views

How to find .php files with numbers in the filename

I've been having files being included in one of my systems. An example of these is default76.php Most times there are just 2 digits before the extension. I need a way to find these files and print ...
0
votes
1answer
42 views

Find command replaces text unwantedly

I am running an Ubuntu EC2 instance. I often use find and replace to update, and tweak things which are used in all files. However, when I have to replace PHP code, I inevitably have to replace the ...
0
votes
0answers
22 views

how to find a file and ftp from ubuntu server?

I am not a unix scripting guy, so I have this question to you all. How I can find a file and ftp it to a ftp server? ncftpput -R -v -u "username" x.x.x.x xyz/ Downloads/[find /home/owner/Downloads ...
0
votes
1answer
36 views

Empty curly braces and semicolon in bash [duplicate]

What does {} \; string mean in bash? I've seen it a couple of times, for example, to find and delete all files by name one must execute find . -name "FILE-TO-FIND" -exec rm -rf {} \; What does ...
3
votes
1answer
37 views

Finding linked files

Trying to find where /usr/include/freetype2/ft2build.h file is linked in my system: sudo find -L / -samefile /usr/include/freetype2/ft2build.h This dives many errors File system loop detected ...
3
votes
1answer
52 views

Delete files that were created before today

I want to search files whose creation date is prior than today. I do : find $HOME -type f -name "myFile_*.sql.zip" -mtime +1 but it doesn't return anything, it should at least return one file. ...
1
vote
1answer
58 views

Ubuntu find and replace in files of current directory recursively

I am running Ubuntu 14.04 and Magento website in my Local System. Now I have a module directory in which I want to replace every occurrence of "Magento\Module" with "MyCompany\Module" in all files ...
1
vote
1answer
44 views

Ubuntu print output of “find” and “exec” to file [duplicate]

I have a command which list outs events of "Magento 2", which is working fine in the terminal. I want it's output to be printed into a file but none of the below code works: find . -type f -exec ...
3
votes
2answers
141 views

How to include/exclude many different files/folders using terminal

I am doing a search for files that have been edited in the last day using the find . -type f -mtime 0 function in terminal. I want to exclude some files and folders in the query, such as .DS_Store ...
4
votes
1answer
135 views

Search files content for possible BTC key strings

I have 4 BTC addresses on two of my drives that I cant bloody find. I saved them under stupid name so they would be hard to find if someone had access to my system. Now I cant find them. Is there a ...
3
votes
2answers
52 views

copy files by date

How can I copy files in a folder based on when the file was last edited? Lets say I want to copy all my files that I last edited today from c: to my folder bak. How can I achieve that? I know that a ...
0
votes
2answers
39 views

how to have chown only effect folders, not files?

I have to chmod a structure of subfolders which contain more sufolders and also files naturally. Now I need to change access rights (owner:group, no acl at this point) to this complete structure in ...
0
votes
1answer
18 views

make clean in several subdirectories

I want to clean several (>20) subdirectories with make clean. I thought about someting like this: find ./ -type d -maxdepth 1 | xargs "make clean" but it doesn't work. Could you please help me?
0
votes
1answer
613 views

Where does Desktop Telegram save sent pictures?

i use telegram with my pc. i know that telegram save all pictures in a folder on android. is telegram save pictures on pc too ? and if yes, where is it ?
9
votes
3answers
671 views

How to combine the output of multiple `find` commands?

find -type f -name "*.avi" -exec md5sum {} + > checklist.chk find -type f -name "*.mp4" -exec md5sum {} + > checklist.chk How to combine these two commands? Either by combining both search ...
0
votes
1answer
49 views

Finding and copying files in Terminal

I have a .txt file (called list.txt) containing a list of filenames, including their paths. Such as: /Users/Me/Downloads/0001.pdf /Users/Me/Downloads/0010.pdf /Users/Me/Downloads/0053.pdf ...
0
votes
2answers
62 views

How can I use “mv” to gather all the files found by “find” in the same folder?

I can find all the files I want using find however I want to use mv to move them all to a certain folder. How can I do that?
5
votes
2answers
2k views

What does grep do?

Here is the description of grep from GNU.org: grep searches input files for lines containing a match to a given pattern list. When it finds a match in a line, it copies the line to standard output ...
1
vote
1answer
68 views

One-word command to search for a file

I know there's a command to search for a file anywhere. It's a quite simple, 1 word command. Sadly, I forgot what it is. So, let's say I want to search for a file name testingthis. The file could be ...
2
votes
1answer
87 views

Command to change permissions only on files not directories

I have the following command find . -type f -print0 | xargs -0 chmod 644 which would successfully change to 644 the permissions on all files in ., provided that the filenames contained no embedded ...
0
votes
0answers
24 views

Directory showing with find but not with ls

I have a 2TB ntfs disk mounted. The fstab entry looks like this /dev/disk/by-uuid/7AD35DE723741E22 /home/herb/2TB ntfs defaults,uid=1000,gid=1000 0 2 I installed a service with a web front end on the ...
1
vote
1answer
98 views

How can I recursively copy files by file extension?

I would like to copy all files with a certain extension that are in sub directories to a different folder. I don't want to maintain the directory structure, I just want to copy all files found to a ...
1
vote
1answer
48 views

assign variable with find option [duplicate]

shopt -s nullglob shopt -s failglob find . -maxdepth 1 -type f -name '*[0-9][0-9]o' -printf 'x' | wc -c I need to assign the numeric result of the find command to a variable. For example: a=find . ...
1
vote
2answers
48 views

How to find gaps in list?

So, I have allot of files (167k) and now they are now in proper order, thanks to Serg's script in here - http://askubuntu.com/a/686829/462277 . And now I need to find gaps between filenames, the ...
1
vote
1answer
51 views

Help with MKV to MP4 Remux script

Overview: I'm trying to remux my mostly MKV library to MP4. I have a script that has gone through and extracted subtitles from the video files. I have another script that will remux any .mkv files ...
0
votes
1answer
25 views

Recover lost video

I used youtube-dl to download a video. It saved in my Home directory. Then I did sudo mv file_name /Videos but it's not in my Videos directory and also not in Home. I am using sudo find / but it's ...
3
votes
6answers
366 views

Find all files with specific extensions that contains a string

I'd like to know how could i find all files whose extension can be .xml and .py that contain the string "Jason" under a path "./" recursively? Or how could i exclude .po from the search?
1
vote
1answer
166 views

How can I find world writable files and folders and set the sticky bit?

I want to do the following: Need to find all world writable files and folders from / root. If found, I need to check whether the sticky bit is set or not. If the sticky bit is not set, then set it. ...
3
votes
1answer
80 views

A utility to find duplicate folders (NOT files)

I know about rdfind that can find duplicate files in two directories. But I need a similar utility that finds duplicate folders (folders that have same name and same path relative to main directories) ...
21
votes
1answer
425 views

find vs. locate

There are the commands find and locate to search for files on the disk. I know that find recursively processes all needed subdirectories to search files and therefore is slow but up-to-date, whereas ...
1
vote
3answers
203 views

Alias to search files by name and open them in vim

I already have an alias to (more) quickly search files : alias f='find . -iname' I use it as such: $ f *statis* ./main/statistics.py ./test/test_statistics.py Now, I would like to have another ...
1
vote
0answers
79 views

Highlight search results in Ubuntu Gnome's terminal?

Is there a way/plugin to highlight the searched strings in Gnome's terminal on Ubuntu (When using Ctrl+F or similar keys)? Not just a single result, but all which appear inside the window?
3
votes
1answer
43 views

Finding, moving and removing in Ubuntu

OS: Ubuntu 14.04.2 LTS (GNU/Linux 3.13.0-62-generic x86_64) I have a directory like the following: ~/total/ test1/ test1.txt some_other_file_i_dont_care.py test2/ ...
3
votes
1answer
49 views

How to find a hidden file?

Somewhere on my 10T NAS devise is a file named exactly .avi I have tried find, locate and ls. All return either all files ending with extension .avi or nothing at all. How can I find it explicitly? ...
1
vote
0answers
15 views

Split found files to run find -exec commands in parallel [duplicate]

I have a multi-level directory of jpegs that I want to optimise on a semi-regular basis (as things are added). The command I'm using jpegoptim is single-threaded so when I run the following, only one ...
4
votes
1answer
792 views

Piping find -name to xargs results on filenames with space not being passed to the command

Normally to remove files with spaces in their filename you would have to run: $ rm "file name" but if I wanted to remove multiple files, i.e: $ find . -name "*.txt" | xargs rm This will not ...
1
vote
1answer
62 views

FIND command to find files and exclude one subdirectory

I want to find the *.mxf and *.MOV files with One Directory which are older than 14 daysbut i want to exclude one sub directory named as Secure within this search. here is my command , which i am ...
1
vote
2answers
101 views

Sort files alphabetically before processing

I use the command find . -type f -exec sha256sum {} \; > sha256SumOutput to hash every file in a folder hierarchy. Unfortunately, sha256sum doesn't get the file names from find in alphabetical ...
1
vote
1answer
52 views

Help troubleshooting Variable in simple script

So i have this script here Remove Audio Streams of videos - recursively without converting audio or video with FFMPEG But the subtitles part doesn't work. Currently I have tried a few variations of ...
1
vote
1answer
41 views

Edit find command to exclude a file

So I made this script Convert videos recursively with handbrake. And it uses this command as an option find . -name '*.mkv' -exec rm -r {} \; But i made this new script, for removing audio streams ...
1
vote
1answer
138 views

Using rsync to back up a remote computer through a reverse ssh link

I can rsync to my remote computer, but cannot rsync from my remote computer--it doesn't seem to exchange a file list in that direction, so it tries to transfer all of a huge number of files rather ...
0
votes
0answers
20 views

Not recognizing the “find” command in Mutt configuration file

Just trying to setup mutt to use with Maildir, following the instructions on this page: http://www.elho.net/mutt/maildir/. However, when I start mutt, it gives me the following error Error in ...
0
votes
1answer
78 views

How to find if LightSpeed server is installed

I have LAMP installed in a VPS. When I visit my domain, Apache responds. But every once in a while, LightSpeed responds, i.e. instead of showing the Apache web root, it shows the LightSpeed web root. ...
0
votes
1answer
31 views

Clear the dirent cache on Linux

Watch the difference: ryan@DevPC-LX:~/stuff/nana$ time find . -name libnana.a ./libnana.a real 0m0.215s user 0m0.005s sys 0m0.017s ryan@DevPC-LX:~/stuff/nana$ time find . -name libnana.a ...
2
votes
3answers
105 views

Get a script variable into subshell launched by find

Following on from this question I've used the following command in a bash script: find ${svn_root} -maxdepth 2 -type d -exec bash -c 'if svnlook info "$1" &>/dev/null ;then echo"$1" ...
8
votes
5answers
775 views

How do you output the filename in find command while using -exec?

I use the following line to find all sub-directories of the PWD and run svnadmin verify on each directory (I already know that they're Subversion repositories) find ./* -maxdepth 0 -exec svnadmin ...