Finding Files in Linux

Hi Guys,

 

I saw an interesting beginners video on Hak5 about locating files within linux. This made me think about some of the commands that I used to locate certain thing such as files used in apache compromises or files tha developers may have put on a server and forgot where. There are many ways to find what you are looking for but we need to start at the beginning. The following are from a video that Shannon Morse did on finding files.

 

I know the following seem to be the easiest and basic but we have to start somewhere in order to find what we are looking for. Thanks Shannon Morse for the following.

 

—===—===—===—

Locate 3 non case sensative words named test

locate -i -n 3 test

—===—===—===—

Locate case sensative words

locate test
locate Test

—===—===—===—
Search a file called Test for keywords such as word

grep word Test

—===—===—===—
Search for the keyword word in all files using *

grep word *

—===—===—===—
Locate a file that is case sensative and name specific in the current folder. If the files test or Test do not exist, nothing will be shown.

find -name test
find -name Test

—===—===—===—
Locate any file with the name test within it in the current folder.

find -name “*test*”

—===—===—===—
Locate files owned by a user (kf4bzt) in the current folder.

find -user kf4bzt

—===—===—===—
Locate files not owned by a particular user in the current folder.

find ! -user kf4bzt

—===—===—===—
Locate files with a specific group in the current folder.

find -group apache

—===—===—===—
Locate files not with a specific group in the current folder

find ! -group apache

 

—===—===—===—

—===—===—===—

Not that we have some basics behind us, we need to expand on them and do some other searching. 🙂

 

In order to find specific folders by name and place the results into a file:

find . -type d -name ‘uploads’ > uploads

 

—===—===—===—

 

Read the same file above as a reference for another find to locate php extensions within the folders found. 

for i in `cat uploads`; do find $i -type f -name ‘*.php’; done 

 

—===—===—===—

Let’s say that you want to locate files name page68.php and add the results to a file called comp. Below shows how to do this.

find . -type f -name ‘*’ -exec grep –i page68.php {} > comp \; 

 

 

SharkLinux The Rolling Release Ubuntu Distro

Hey Guys,

 

First of all, I want to mention that I am a die hard Arch Linux user. Arch gives me everything that I need to be successful with little or no issues at all. If a package is not located in the arch repository, I have access to the AUR community repository which has most if not all packages that I want. I haven’t really used an Ubuntu based distro in a while since I found that I had to go and download certain applications manually that I wanted to use instead of them being readily available.

I was looking around at the latest information on distrowatch.com and came across an interesting and cool distro which is based on Ubuntu 16.04 with the Mate 1.16 desktop environment installed. This OS has a lot of possibilities and has some nice add-on features. I put together a video on this distro so everyone can get an idea of what is in it. Sorry about the audio as something happened with the headset that I was using. If you would like to download the OS and play with it, just visit the URL shown below.

 

http://sharklinux.net/

 

 

—===—===—===—

—===—===—===—

 

 

—===—===—===—

—===—===—===—

 

Here are some screenshots of the application categories and settings menu. I would like to mention that I had customized the look of the desktop by turning off the XFCE4 panel with the whiskermenu and went with the traditional Mate panel with. The XFCE panel seemed a little cramped with the icon set that was in use. I was having some issues getting my dock to work so I just set up without it.