Please forgive me if this question has a ridiculously obvious answer, I am new to Linux and still have trouble trying to figure things out.

In case it's needed, I'm working with a copy of SuSE 9.3 OS.

Is it possible to send the output of a 'find / -name *** -print' statement to a file somewhere on the system? I'm seeking a specific bit of information, but I don't know the actual name(s) of the necessary file(s) and the onscreen output from a find with the first part of the name followed by a wildcard is long enough that by the time it's finished, about half the results are already beyond scroll range. If I could save my results to a file somewhere, that would at least give me a chance to look over all of them.

Is this possible? And if so, how should I go about doing it?

Thank you for your consideration,
EnderX

Dani AI

Generated

As noted, sending find output to a file is the right fix for lost scrollback. Practical tips and safer variants follow so the saved results are complete, readable, and less noisy on a SuSE 9.3 system.

# keep the shell from expanding the glob; write results to a writable file
find / -name 'pattern*' -print > /tmp/find-results.txt

# keep permission errors separate
find / -name 'pattern*' -print > /tmp/find-results.txt 2>/tmp/find-errors.txt

# capture both stdout and stderr in one file
find / -name 'pattern*' -print > /tmp/all-find-output.txt 2>&1

# save and browse as it runs
find / -name 'pattern*' -print | tee /tmp/find-results.txt | less

# avoid pseudo-filesystems that generate noise
find / -path /proc -prune -o -path /sys -prune -o -name 'pattern*' -print

Notes and cautions: quote the pattern (single quotes) so the shell does not expand wildcards. Use -iname for case-insensitive matches and -xdev or -path … -prune to skip other filesystems (reduces time and permission messages). Running as root (or via sudo) is required to see some paths; otherwise expect many "permission denied" messages (capture those with 2>). For faster filename-only lookups, use updatedb/locate when available. Store output in a writable place (for example, a file under the home directory or /tmp) and open it with less, grep, or an editor to inspect results after the run — this addresses 's scrollback issue while building on 's redirect suggestion.

I think this is what you want (correct me if it isn't):

find / -name *** -print > ~/file.txt

Basically you use the redirect symbol '>' to send the output of a particular *nix command into a file. You can also append output to an already-existing file; just replace > with >>.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.