Sponsored Content
Full Discussion: System wide find and sort
Operating Systems Linux System wide find and sort Post 302306199 by Housni on Saturday 11th of April 2009 02:31:01 PM
Old 04-11-2009
oh actually, i did `updatedb` and i just combined the locate command with xargs and that worked:
Code:
$ sudo updatedb && locate ldap.conf | xargs ls -lt

thanks for the reply though Smilie
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

links working system wide

I have created symbolic links to several frequently used commands, for example: "lt" is a link to "ls -ltrgo|tail". What can I do to make these links available system-wide, or at least in the directories my coworkers are in most of the time? I have copied the link to several directories, and... (6 Replies)
Discussion started by: jpprial
6 Replies

2. UNIX for Advanced & Expert Users

System wide CDE setup

Does anyone know how to make system wide changes to the CDE's front panel icons? I dont know if it matters but im running Solaris 9. THanks (1 Reply)
Discussion started by: meyersp
1 Replies

3. UNIX for Dummies Questions & Answers

FIND function - system wide

Hi, I have a task to search for a file called 'Xstartup' in the whole system because there might be different versions of it which overrite eachother. Can anyone suggest a smart command to run this search ? The machine needs to scan every single folder beginning from root. Please help, I am... (5 Replies)
Discussion started by: DGoubine
5 Replies

4. Shell Programming and Scripting

system wide password change

Hello, I am new to shell scripting and I was trying to write a script that would force a system wide password change except for admins. I am having some trouble and any help that someone could give me would be greatly appreciated. I am trying to do it by using the UID as the marker for anyone... (6 Replies)
Discussion started by: kilemark
6 Replies

5. HP-UX

System wide user thread limit. does that exists :?

Hi all, Is there any system wide limit on number of user threads. I only find nkthread as a tunable parameter,apart from the `per process limit`. (1 Reply)
Discussion started by: Krsh
1 Replies

6. UNIX for Advanced & Expert Users

Declaring LD_PRELOAD system wide for dynamic loading

Dear Fellows; As being new to linux, i have tried to synamically load a custom library which overrides some system calls like conncet(), socket() etc.... for custom purposes. It works well, if declaring the environment path LD_PRELOAD and execution of the application to be override... (0 Replies)
Discussion started by: mzeeshan
0 Replies

7. UNIX for Dummies Questions & Answers

[GPG] System-wide public key?

We need to have many of our users all send encrypted files to a single FTP server. The problem, if I understand how encryption/decryption works (which I don't), is that each user would normally have their own private and public key. The other end needs to be able to decrypt the file(s) using a... (6 Replies)
Discussion started by: Totengraber
6 Replies

8. Red Hat

Changing system-wide for umask

Hi everybody, How can I change the default UMASK for non root users, e.g. I want the umask for every new created user will be 0044. Thanks (6 Replies)
Discussion started by: leo_ultra_leo
6 Replies

9. Shell Programming and Scripting

System-wide search

When looking for wherever a program or a filename appears in the system, a short scrip is "findinner" which another script calls with a long parameter list consisting of path names ending with ".sh" or ".menu". "findinner" looks like this: # If not .savenn file, show name and result of grep. #... (4 Replies)
Discussion started by: wbport
4 Replies

10. Programming

How to make use others' C library installed not for the system-wide (Ubuntu/Linux)?

I have downloaded and installed a library called htslib for specific bioinformatic use but not for the system (I'm using Ubuntu 18.04). Only parts of the library is needed for my exercise to parse data in a type called VCF format (basically tab-delimited file but contains many information in... (14 Replies)
Discussion started by: yifangt
14 Replies
UPDATEDB(1)						      General Commands Manual						       UPDATEDB(1)

NAME
updatedb - update a file name database SYNOPSIS
updatedb [options] DESCRIPTION
This manual page documents the GNU version of updatedb, which updates file name databases used by GNU locate. The file name databases con- tain lists of files that were in particular directory trees when the databases were last updated. The file name of the default database is determined when locate and updatedb are configured and installed. The frequency with which the databases are updated and the directories for which they contain entries depend on how often updatedb is run, and with which arguments. In networked environments, it often makes sense to build a database at the root of each filesystem, containing the entries for that filesystem. updatedb is then run for each filesystem on the fileserver where that filesystem is on a local disk, to prevent thrashing the network. Users can select which databases locate searches using an environment variable or command line option; see locate(1). Databases can not be concatenated together. The file name database format changed starting with GNU find and locate version 4.0 to allow machines with different byte orderings to share the databases. The new GNU locate can read both the old and new database formats. However, old versions of locate and find produce incorrect results if given a new-format database. OPTIONS
--findoptions='-option1 -option2...' Global options to pass on to find. The environment variable FINDOPTIONS also sets this value. Default is none. --localpaths='path1 path2...' Non-network directories to put in the database. Default is /. --netpaths='path1 path2...' Network (NFS, AFS, RFS, etc.) directories to put in the database. The environment variable NETPATHS also sets this value. Default is none. --prunepaths='path1 path2...' Directories to not put in the database, which would otherwise be. Remove any trailing slashes from the path names, otherwise updat- edb won't recognise the paths you want to omit (because it uses them as regular expression patterns). The environment variable PRUNEPATHS also sets this value. Default is /tmp /usr/tmp /var/tmp /afs. --prunefs='path...' File systems to not put in the database, which would otherwise be. Note that files are pruned when a file system is reached; any file system mounted under an undesired file system will be ignored. The environment variable PRUNEFS also sets this value. Default is nfs NFS proc. --output=dbfile The database file to build. Default is /var/lib/locatedb. --localuser=user The user to search non-network directories as, using su(1). Default is to search the non-network directories as the current user. You can also use the environment variable LOCALUSER to set this user. --netuser=user The user to search network directories as, using su(1). Default is nobody. You can also use the environment variable NETUSER to set this user. --old-format Create the database in the old format. This is a synonym for --dbformat=old. --dbformat=F Create the database in format F. The default format is called LOCATE02. F can be old to select the old database format (this is the same as specifying --old-format). Alternatively the slocate format is also supported. When the slocate format is in use, the database produced is marked as having security level 1. If you want to build a system-wide slocate database, you may want to run updatedb as root. --version Print the version number of updatedb and exit. --help Print a summary of the options to updatedb and exit. SEE ALSO
find(1), locate(1), locatedb(5), xargs(1) Finding Files (on-line in Info, or printed) BUGS
The updatedb program correctly handles filenames containing newlines, but only if the system's sort command has a working -z option. If you suspect that locate may need to return filenames containing newlines, consider using its --null option. The best way to report a bug is to use the form at http://savannah.gnu.org/bugs/?group=findutils. The reason for this is that you will then be able to track progress in fixing the problem. Other comments about updatedb(1) and about the findutils package in general can be sent to the bug-findutils mailing list. To join the list, send email to bug-findutils-request@gnu.org. UPDATEDB(1)
All times are GMT -4. The time now is 03:43 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy