Tagged Questions

The tag has no wiki summary.

learn more… | top users | synonyms

0
votes
1answer
16 views

find command giving different outputs with/without -print

find src/ -name "*.cc" -o -name "*.cpp" -print find src/ -name "*.cc" -o -name "*.cpp" The intended behavior is to find all C++ files in a directory and all its subdirectories. As I understood it, ...
-1
votes
4answers
102 views

find all files older than 1 minute

How can I use find to select files that have been written and not modified in the last minute? I know I can do the other way around, find files modified in the last 60 seconds with -mtime -60s but I ...
3
votes
4answers
75 views

Ubuntu grep, find etc: “Permission denied” and “No such file or directory” output

When I grep or find something I always get annoyed by the "Permission denied" and "No such file or directory" notice, smth like that: johndoe@johndoe-desktop:/$ grep -rnP 'YII_CORE_PATH' ./ | grep -v ...
-2
votes
2answers
91 views

Shell script error using command find

My script is supposed to: recursively look for files and directories whose names contain given strings, using find, starting in the current directory. If no arguments are given the message Missing ...
3
votes
1answer
90 views

How to physically reorder files `03.mp3 01.mp3 02.mp3` (`ls -f`) in a directory?

The physical order of the files matters when I copy them onto my USB stick and listen in car mp3 player. Most of my music album folders are unsorted, e.g. ls -f may produce: 03.song3.mp3 01.song1.mp3 ...
0
votes
1answer
38 views

Auto rename symbolic link

I have a folder which contains many sub-folders which contains many images. I find it tedious to go into each folder to browse the images so I decided to create an empty folder and create symbolic ...
1
vote
1answer
23 views

system-independent find following symbolic links?

I want to use the 'find' command and have it follow symbolic links. However, I need to call the command from other code (IDL, which doesn't have very nice built-in file searching) on both a RedHat ...
0
votes
1answer
65 views

How to compress all directories that weren't used in the last month?

How can I compress all the directories that do not contain at least one file used in the last month?
-1
votes
3answers
76 views

Excel find and replace from three columns [closed]

Please consider the following three columns: OLD-REP OLD NEW 1 1 2 2 2 3 2 3 4 2 4 5 2 5 6 2 ...
0
votes
1answer
47 views

Unix pipe: find | ln -s

I'm trying to symlink some php files using the following command: find `pwd` -name "*.php" | ln -s * /home/frankv/www/bietroboter.de/symlinks However, all the symlinks are broken because the little ...
0
votes
2answers
31 views

How to delete a file after processing

I am using mp3splt to split all the .mp3 files under a directory, including subdirectories, into 30 minute slices. find -name *.mp3 -print0 | xargs -0 mp3splt -t 30.00 -o @f_@m@s What is the best ...
1
vote
2answers
96 views

Bash Find Files with zero size and delete files with different extensions

This command will find files of zero size: find . -size 0 A filename returned might be filename.001 I am looking for a one liner that will delete files found with this, plus any that have the ...
2
votes
1answer
45 views

why don't ls -lrt `find .` and find . -exec ls -lrt {} \+ produce the same output?

I'm trying to sort files by date, including those that reside in subdirectories. I got it to work by using: find . -exec ls -lrt {} \+ which I found somewhere on StackOverflow. My initial try was ...
2
votes
1answer
45 views

How can I find a particular file without extension in Linux?

I've wondered recently if there is any way to look for archives|pics|media in Linux dirs? I can do it using the find command like this: find ./ -iname "*.tar" or find ./ -regex ...
4
votes
2answers
67 views

Search text in list of files

I'm trying to execute double search within files and return file names. I'm using find ./ -iname '*txt' | xargs grep "searchtext" -sl to find file names with 'searchtext' in them. Command is ...
1
vote
1answer
59 views

Is the 'find' utility on Windows 7 different than the one on Windows XP?

I have a batch script that I created which works fine on Windows XP but faults on Windows 7. The script basically finds out what the OS is. wmic os get | find "Windows XP">nul if %ERRORLEVEL% ...
1
vote
1answer
41 views

Create symlinks recursively for a whole tree

I am seeking for a command that would re-create a whole tree of files in a different directory. I would prefer to have all symlinks absolute. Can I do that with a find and xargs? ;-)
2
votes
2answers
118 views

Textmate: regular expression to replace matches preserving case?

How can I use a single search / replace to replace all words town with village preserving the case of the first letter in this sentence: Towns are small cities. I live in a town.
1
vote
1answer
39 views

Mounting a binary/shell file that returns files modified in the past x days

I know that you can find files in a path and sub directories modified in the past week with: find -L /somepath -mtime -5 -type f I could assign that to a job and have it run every night to create ...
0
votes
3answers
55 views

How to find faster in linux

I have some directory with funny character such as ^M at their back. They were created accidentally and I want to delete them. I list the directories by ls -iql and wrote down their inode number, ...
1
vote
1answer
89 views

Linux find and grep for files not match pattern

I'm trying to search the entire file system for specific text. This command does that but it gets hung up in certain directories like '/proc': find / -print0|xargs -0 grep whatever What I'd like ...
0
votes
3answers
58 views

How do I find a directory when I'm connected through SSH?

I am inside the home directory of a Linux machine (which I logged into using Putty). From there on I need to find a folder named my-web1.0. Is there any way to go know the path of that directory ...
0
votes
2answers
41 views

unix find command regex

I want to search file name with regex, and the grep it using regex. I tried this: find . -name co_on*eruo* | xargs grep '0LF2C Comdty(.*)20111022(.*)' But it doesn't work. What am I doing ...
0
votes
2answers
75 views

File name with spaces piped to two xargs commands

I have a directory and many more subdirectories like the following - file with spaces.txt filewithsuperlonglines.txt ordinaryfile.txt binaryfile.bin The command - find . -type f -print0 | ...
2
votes
2answers
84 views

Chrome extension for highlight+find prepopulate?

I switched from Firefox to Chrome as my go-to browser some months ago and there is one piece of functionality that still pesters me. Seems trivial/ignorable but this one is driving me nuts little by ...
1
vote
1answer
47 views

Find files in Mac OS X by permissions setting?

I recently needed to restore my Mac (10.6.8 v1.1) from a backup and while the machine is stable and intact, a scattering of files have incorrect permissions in my user account which is interfering ...
0
votes
1answer
84 views

“find | grep | awk” fails miserabily

I'm scanning for all shell scripts on my server, and are doing this by the following command: find / -type f -exec file --mime-type {} \; | grep "text/x-shellscript" This is working fine, and here ...
0
votes
1answer
27 views

Use “find” command to list files IN specified directory

I'm putting together a perl script, and I'm using the following command to list all files and directories under a specified directory `find $dir -print` This lists all files and directories UNDER ...
2
votes
1answer
57 views

How to find files that don't belong to a given user

How do I recursively search for all files or directories that do not belong to given user?
2
votes
2answers
61 views

How can I speed up a selective deep copy command in unix?

I am (ab?)using the unix 'find' command to recursively export files from a directory tree that is littered with .svn directories. This command takes a long time to run. Is there a faster way to ...
0
votes
3answers
35 views

How do I check which recovered files are valid?

I have a lot of recovered files of which many are invalid even though they appear to be ok by name and extension. This is expected. Now I to need filter out those which are probably ok. I see to ...
1
vote
1answer
93 views

Alias find to ignore “permission denied” errors

When you run the find command on files you don't have permissions for, you get annoying "Permission denied" errors which clutter the output. Wikipedia suggests the following fix: If you're doing ...
0
votes
1answer
39 views

Searching for *.graphml files with the find utility

I am trying to find all my GRAPHML files under the current directory in bash. So I ran the following command: find . -name *.graphml And I get the error message: find: paths must precede ...
0
votes
1answer
52 views

find with exec : how to perform multistep conditional action on each file

I have bunch of php files in directory structure say /mylibs I want to run a simple php -l $file on each php file which checks for syntax errors find /mylibs -type f -iname "*.php" -exec php -l {} ...
1
vote
2answers
161 views

Faster alternatives to “find” and “locate”?

I will like to use "find" and locate" to search for source files in my project, but they take a long time to run. Are there faster alternatives to these programs I don't know about, or ways to speed ...
2
votes
2answers
690 views

Why is it so hard to find a file in Ubuntu?

It's very hard to find files in Ubuntu. In Windows you could just go to C:\Program Files and you would find what you need. In Ubuntu you must use search to find something you need. Maybe I am ...
0
votes
1answer
49 views

find xargs and curl give an error with -C- option

This command works fine find ~/mypath -name *.fstq -print|xargs curl -u sdd:dsdsd ftp://ftp.dsdd.nsdh.com/sdsds/ -T but when I add find ~/mypath -name *.fstq -print|xargs curl -C- -u sdd:dsdsd ...
0
votes
3answers
73 views

find specific files using “find” command only in top directory

I got one probably silly question: I'm working on remote server under Solaris using ssh and my task is to find specific files in directories matching shell pattern but not go recursively deeper. ...
6
votes
2answers
172 views

Invoking vi through find | xargs breaks my terminal. Why?

When invoking vim through find | xargs, like this: find . -name "*.txt" | xargs vim you get a warning about Input is not from a terminal and a terminal with pretty much broken behaviour ...
2
votes
3answers
140 views

Linux: How can I edit all the files returned by find in vi?

Something I find myself doing a lot is running a find command and then editing all of them in vi, which looks something like this: > find . "*.txt" ./file1.txt ./file2.txt ./path/to/file3.txt ...
3
votes
3answers
61 views

How do I run this `find` command, but only on non-binary files?

I want to remove trailing whitespace from all the files in a recursive directory hierarchy. I use this: find * -type f -exec sed 's/[ \t]*$//' -i {} \; This works, but will also remove trailing ...
2
votes
7answers
91 views

Find all files that are NOT of a specific type/extension in folder?

Windows 7 Ultimate 64bit: I'm looking for a way to find all the files in a directory that are NOT of a specific file type or extension. Example: I'd like to find every file that isn't an .mp3 in my ...
0
votes
2answers
61 views

How do you search for specific text in specific file types? [closed]

Possible Duplicate: How can I grep in source files for some text? What's the command to search for specific text in specific file types, recursively, under the current directory?
1
vote
2answers
76 views

Can I simulate ack by using grep with the right combination of options?

I have ack-grep installed on my local machine, and find it indispensable for quickly 'acking' through a codebase when debugging. However, on my cheap shared hosting, there is no ack-grep. One of the ...
9
votes
8answers
588 views

Is it possible to find a printer's physical location in a building by its IP adress?

I am in a school with probably 200+ computers and I did an IP scan among a certain range and found three or four printers. I was wondering if it would be possible to find these printers in the school, ...
4
votes
1answer
154 views

DOS Batch file to find “new” files by date

My PC has entered an infinite BSOD loop - but I do have access to a safe-mode command prompt. I'm trying to get an idea of "what changed" that might have triggered this. e.g. I might have gotten a ...
1
vote
2answers
102 views

GNU find: Disable the error when 'find' finds no matches

I've got a setup where I need to use 'find' to find 0 or more files in a certain directory, however, 'find' always produces an error when there are no files that match a certain check. Is it possible ...
1
vote
3answers
114 views

How can I determine whether different commands using grep, find and xargs do the same thing?

Do these three commands do the same thing? A command that uses grep. grep "a" -r . A command that uses find. find . -exec grep "a" {} \; A command that uses a grep on a find through xargs. ...
1
vote
4answers
194 views

find and replace text in multiple files (windows 7)

I’m hoping someone might lend their time in helping me create a batch file or similar for finding and replacing text in several files. I have tried many “search and replace” utilities but have not ...
1
vote
6answers
103 views

Finding files based on date, without using `find`

I know find can do what I am looking for, but I am wondering if there is an alternative way to find files on the filesystem either created before/after a certain point, or at a certain time. ...

1 2 3 4 5