some commands for search

1. locate (only search file by file name in mlocate database)

        /var/lib/mlocate

        /etc/updatedb.conf

        PRUNE_BIND_MOUNTS="yes"  ->  open search limit

        PRUNEFS  ->  not search the file system

        PRUNENAMES  ->  not search the file type

        PRUNEPATHS  ->  not search the path

2.  updatedb

        u need update the mlocate database immediately that u can use the locate command to search new file.

3. whereis (only search the system commands, path and help file)

        -b   only search excutable file

        -m  only search help file

4. which (search the system commands, path and alias)

5. find [range] [condition]

        wildcard -> * / ? / [ ] 

        -name (full matching)

        -iname (case insensitive)

        -user (according to the owner)

        -nouser (no owner's file)

        -mtime (the time to modify file contents)

        -atime (the time to access file)

        -ctime (the time to change file attributes)

                -time  ->  modify file within the specified time(day)

                time    ->  specified time for the day to modify the file(day)

                +time  ->   to modify the file before the specified time(day)

        -size (file size)

                -size  ->  less than size

                size   ->  be equal to size

                +size -> more than size

        -inum (i node)

        -a (and)

        -o (or)

        -exec (the command behind exec excute the result which excuted by the command in front of exec)

                {} \;  ->  the end symbol

6.grep (search string)

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章