Questions tagged [find]

A commandline utility to find files and directories.

60 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
4 votes
0 answers
5k views

Invalid magic number and need to load kernel

I'm new to try Ubuntu on my broken laptop to backup some files before reinstall W10. I downloaded Ubuntu 22.04 LTS through official website and used Rufus to create a bootable USB with that ISO thing ...
Anonymous Zero's user avatar
3 votes
0 answers
1k views

How Can I Combine 'SRM' and 'Find'?

I'm using SRM to securely delete files and directories. Most of the data is on FAT and NTFS volumes since I dualboot with Windows (I'm trying to use Ubuntu as much as possible and stay away from ...
tSquirrel's user avatar
  • 315
2 votes
0 answers
183 views

Correct way to delete /boot/firmware .bak files in Ubuntu 22.04?

I'm very new to Ubuntu, I installed the Raspberry Pi Ubuntu Server 22.04.3 LTS (64-bit) image, with their imager tool: # lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:...
Floren's user avatar
  • 151
2 votes
0 answers
46 views

Is there an easy way to find all files on an ubuntu server and load them along with path information into mysql?

I am using Ubuntu server 20.04 for OwnCloud and backups of multiple networked computers. I know I have many duplicate files on the server and would like to have one database of all files so I can ...
CncJerry's user avatar
2 votes
0 answers
54 views

find does not find directory

I have a folder with information of the courses I am teaching or I have teached. In there I execute find to search by name: ~/Academic/Cursos$ find . -name '2022*' -print ./MaGAAV/Formulación de ...
Rafael Morales Gamboa's user avatar
2 votes
0 answers
128 views

Using the find command in Krunner

I am a big fan of krunner. But eversince I came across it I have been disappointed by its search function. When I am searching for a specific expression I normally use: find . -iname '*heavymetal*' ...
user634093's user avatar
2 votes
0 answers
1k views

Slow performance of find

I have a process that creates many nested directories and files in output directory. Right now the directory has 67,000 files which does not sound much. I have a cleanup cron job setup exactly like ...
user871199's user avatar
2 votes
0 answers
737 views

Where can I find default noisy color backgrounds?

I'm using Ubuntu 18.04 LTS version. I want to change login screen background to as like my lock screen background. I know how to change login screen background but I can't find the default color ...
aysum's user avatar
  • 61
2 votes
0 answers
79 views

How to find the last valid information possibly spread over several log files

I have a fleet of buses that send me a monitoring log file every morning regarding the status of the vehicle the previous day. The log updates various information every 5 minutes. Among the data ...
Bart Pen's user avatar
2 votes
0 answers
160 views

How can I synchronize all PDFs from one directory with Dropbox?

I want to synchronize all the PDFs from one directory (my Zotero library) to Dropbox. Finally, I want to have a list of all the PDFs, not the directory names. I successfully synchronized all my PDFs ...
mcbetz's user avatar
  • 3,069
1 vote
0 answers
111 views

Copy selected files from one folder, retaining the directory structure

I want to copy all the JPG files from one folder to another and it works. find /path/from/dirA/ -name "*.JPG" -exec cp "{}" /path/to/dirB \; To improve on the above, I would like ...
SEU's user avatar
  • 139
1 vote
0 answers
161 views

Find files from timestamps

I have a lot of files, of which I need to show only those created in the last 3 hours, and sort this list by date. I tried to do it with the following command: find /root/shell/copy/ \( -type f -mmin +...
Par4o's user avatar
  • 11
1 vote
1 answer
137 views

Geany - how to disable mark option in find function?

I pressed mark but now I have no idea how to disable it. And I can not google this. Just closing the window doesn't help.
mevsme's user avatar
  • 521
1 vote
0 answers
39 views

Using find with -delete but not scanning a backup disk mounted in /media

I need to find all directories named ABC in /, but I want find to ignore (not scan) the path /media. I've tried a few ways, as I found on the Internet, but none are working properly. My latest three ...
sebawrite's user avatar
1 vote
1 answer
832 views

How to find and return the names of all images containing specific metadata?

I want to find all .jpg files in my directory that contain a specific tag and copy them to a different directory. In particular, I am using GThumb which allows me to put tags to my photos - it stores ...
Jca's user avatar
  • 11
1 vote
0 answers
501 views

"Permission denied" while trying to find files

I'm running: sudo find / -name .mysql_history and I'm getting: find: ‘/run/user/999/doc’: Permission denied find: ‘/run/user/999/gvfs’: Permission denied Why? Any help would be appreciated. OS Name: ...
BlueSkies's user avatar
  • 2,145
1 vote
1 answer
330 views

Looking for a tool that finds quickly the duplicates of a known file

I have up to now used the tool fdupes to find all the duplicates of a file but this doesn't seem to work. I tried to do : fdupes -r ~/Large_directory file_to_find.txt Firstly I have, just after ...
youpilat13's user avatar
1 vote
1 answer
105 views

How can I select mp3 files by album?

Sorry, I'm a little newer to Ubuntu. I want to use the terminal to delete a large number of mp3 files, but only the ones in a certain album while leaving files in other albums untouched. I have too ...
Karl Marx's user avatar
1 vote
1 answer
625 views

More efficient way to find content of files within millions of files

We currently have a series of files ordered by date, by type and then individual XML files containing details, with the basic structure as: 2020-01-01/ FR_abc FR_abc_datetime_random.xml ...
neophytte's user avatar
  • 153
1 vote
2 answers
1k views

Writing a find command with ffmpeg to process videos

I want to write a command or script to find all my .mkv videos larger than 3Gb, then run ffmpeg to make them smaller (720p) and change the extension to mp4. I have it working except the file ends up ...
ticotexas's user avatar
  • 719
1 vote
0 answers
49 views

I have noticed that sometimes my HD is spinning and spinning running "find command" on Xubuntu 16.04.5

When I start my laptop the HD is spinning executing find command without reason, I tried to clean saved sessions, looking in startup programs if there is any command using find command, but I couldn't ...
vladimir pavloski's user avatar
1 vote
1 answer
86 views

What is the command to list the files of specific extension within the range of file size and with depth of file search?

I tried using the following command but it is not working. sudo find / -type f -iname "*.ttx" -size +5k 2>/dev/null | grep -E '^/?([^/]+/?){0,3}$' I am using 2>/dev/null to avoid error ...
Shrey Kanna's user avatar
1 vote
0 answers
97 views

error with 'find' package

I can't download anything because it says: installArchives() failed: dpkg: warning: 'find' not found in PATH or not executable dpkg: error: 1 expected program not found in PATH or not executable ...
Dimak's user avatar
  • 13
1 vote
1 answer
101 views

Which package manages the Ctrl+F function?

I'm trying to find out which package manages the Ctrl+F (Find) function. I need this so I can properly file a bug; the Ctrl+F function is constantly being launched on whatever application I have on ...
mxyzptlk's user avatar
0 votes
0 answers
36 views

Ubuntu can't find or reogonize file

I've recently just installed Ubuntu, and it's been working fine, until now. Ubuntu doesn't seem to regonize new files anymore. I just downloaded a file, put it in my desktop by GUI, and tried using ...
Ali Hamandi's user avatar
0 votes
0 answers
95 views

No search results with filebrowser and terminal

Hei, Ubuntu 22.10 I don't get search results while searching for files both with databrowser and terminal. Concrete: "Search" stopps after search in the first mentioned directory. A lot of &...
Hans- N's user avatar
0 votes
1 answer
177 views

Calculate video total video length and output as total with respective folder

I'm working with some videos and I want to measure the total length of videos each folder contains and output it with the respective folder. Current structure is like this. . └── Parent folder/ ├──...
John Snape's user avatar
0 votes
1 answer
81 views

Using find's -prune action

In this script: #!/bin/bash # Get the current epoch time minus 1 second to be sure all files are captured. eptime=$((EPOCHSECONDS-1)) # Execute the commands that will do the sought for file changes:...
Stephen's user avatar
  • 517
0 votes
1 answer
451 views

find and copy directories

I have this directory structure: .../current folder/Bx/Px/ where x are different numbers, like x=1, 2, 3... and so on. I want to find directories P* in the current folder and then copy all of them ...
Lilla_mu's user avatar
0 votes
0 answers
244 views

Find command with ZSH based on a list of files

I was used to running BASH but I recently discovered ZSH and I have to say that it works well. However I have a problem with the find instruction below. Let's say we have 3 webp files and one listing....
Osine Bark's user avatar
0 votes
0 answers
28 views

Display files that have additional rights for group and others that the user does not have

I have a problem to solve for a university class I am taking. I need a command that lists files in a directory that have a group or others permission that is set, but it is not set for the owner (such ...
Andreea Silvia's user avatar
0 votes
0 answers
163 views

Use locate (or find) command to locate files on Windows partition from Ubuntu

I use the locate command quite heavily to search for files on my system and I think it works quite well for me. I am now on a system with a double partition (Windows and Ubuntu) and I would like also ...
desmond13's user avatar
  • 744
0 votes
2 answers
305 views

finding directories and files

I understand that I can find directories with a specific pattern using: find . -type d -name "tmp_*" I understand that I can find files with a directory using: find . -type f -name "tmp....
Jason H's user avatar
0 votes
1 answer
88 views

LibreOffice: indent all lines starting with italic via find/replace

I have a huge text, and I would like to indent all lines which start with italic text, via find/replace. I tried using ^ and italic via the format button, but then the search string is not found. If I ...
Rinke's user avatar
  • 1
0 votes
0 answers
270 views

Output of find | xargs not redirecting to log file

I'm developing a Bash script which cleans up old data files periodically, and right now everything works except for the log file I'm trying to generate so I can see what it did. The structure I'm ...
KneadToKnow's user avatar
0 votes
0 answers
405 views

Using find to edit multiple files in multiple directories (that are in consistent form)

what I a trying to do is to use find to edit/replace string in multiple files with same name in multiple directories with consistent form multiple files: status1_cap multiple directories: /home/user/...
charlie090's user avatar
0 votes
0 answers
122 views

Accidentally moved files with the find command to a non-existing folder

I ran the following command: find . -type f -name '*HEIC.jpg' -exec mv '{}' /media/bkup/New_folder/103APPLE/test_2 \ TEST_2 folder does not exist, I have a TEST 2 (no underscore), but the command ...
ultranewbie's user avatar
0 votes
0 answers
2k views

command history

Which is the most correct answer for this question: Write a one-line command that searches the last 50 commands that have been used for the term "find", and saves the result in history.txt ...
Riad B's user avatar
  • 1
0 votes
0 answers
237 views

SED command runs from console but not through incrontab

Trying to make find and replace in a file when it is modified by the system or other user. Incron+SED is the combination has worked the best till this moment. Problem is when the command is put into ...
Lauris Kārkliņš's user avatar
0 votes
1 answer
33 views

Find directories within directories ending in 'l0' that do not contain '*18*' in their names

I am currently doing find . ! -name '*18*' -name '*l0*' -type d but it is listing all the parent directories like 'd1_l0' , 'd2_l0', 'd3_l0' etc only. I actually want subdirectories like 'd1_l0/[15*,...
figs_and_nuts's user avatar
0 votes
0 answers
48 views

how to find directories , compress and save in other location

I have a task - To search 6 months old directories/files. 1) Tar and save to another location. Below command works perfectly, but saving to same location where old files exist find . -mtime +180 -...
Sin15's user avatar
  • 69
0 votes
0 answers
180 views

Print only the path of the file found

When I type this command : find / -name Gson the terminal prints all the folders it is searching and then somewhere in between I see the path Can I somehow print just the path of the file found and ...
Subhasish Das's user avatar
0 votes
1 answer
284 views

How to store output of find from a background command

I have the following excerpt from a script for finding certain subfolders. Meanwhile a spinner indicates that something is taking longer in the background: # runs find as background task and ...
derHugo's user avatar
  • 3,356
0 votes
1 answer
51 views

I don't know how to access my created file

I'm trying to connect my home wifi to my machine with wpa_supplicant but don't know the path to the file with SSID and passphrase. If I do ls -a -1 | less from my user account I can see it in the list,...
Dynecs's user avatar
  • 1
0 votes
1 answer
1k views

While loop does not work, it reads the first line and exits and the locate command that is used does not output the value

We have a shell script which should read line from a file, where the file contents are the filenames, we need to locate the path of these filenames and copy to a different directory. Here we have ...
user3493117's user avatar
0 votes
1 answer
285 views

Current time and modification time of a file

How does the ctime and mtime differ for a file in find command? For example, will find . -ctime +1 and find . -mtime +1 give the same result or not?
Anony's user avatar
  • 773
0 votes
0 answers
80 views

Help using FIND to find a specific file with an owner and permissions specified

in this SUID thread I have some to a grinding halt, with nil success. I need to find a file that is owned by the user Linux, has a SUID set and has user execute permissions set. The file is called ...
user278930's user avatar
0 votes
1 answer
3k views

Find and Grep working properly via prompt but not via Jenkins

I´m trying to filter some files using find and grep via the command below: find . -type f -exec grep -q --exclude=*.{cpp,gradle,java,ttf,txt,xml,md} . {} \; -and -print The funny thing is: via ...
Marcelo Idemax's user avatar
0 votes
1 answer
36 views

file listing system-wide

I am encountering a strange problem on my local machine. I am a developer and I am working with SAP/Hybris. This environment provides an ant build script which even builds the entire web application. ...
ale974's user avatar
  • 21
0 votes
1 answer
717 views

Comlpex grep regex with unexpected token

I have a Magento 2 installation where I am attempting to find any syntactiaclly incorrect xml files. I am trying to use the below command to find any acl.xml files in the code dir that contain a node ...
Peter A's user avatar
  • 31