Searching Commands


search

find
List all files in current and sub directories

find

find / -user syslog
It will show Owned by syslog User

usr

find / -atime 20
Find files accessed in last N days

atime

find / -size 10M
Find files of given size

find / -name ‘syslog’
It will Locating Files by Name

syslog

find / -name ‘syslog’ -size -5M
It will Locating Files by Size

size1

find / -perm 775
Finding by Owner and Permissions

 

whatis ip
It will Search information from man

whatis

which firefox
It will searching the entire file system

which

whereis firefox
It will locate the binary, source, & manual page files for a command

whereis

locate syslog
It will display all syslog files in all paths where in system

locate

ps -ef |grep syslog
It will display only syslog using grep command

ps

grep /home /etc/passwd
It will display /home passwd info in /etc/passwd file

paswd

grep -w “ubuntu” file.txt
It will display all ubuntu words in file.txt

txt

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s