RSSAll Entries in the "File system management" Category

How to mount CD under Linux

This tutorial will show you the command which can be used to mount a CD-ROM on a computer with Linux Operating System via console.

The command should be:

/mnt/cdrom could not exist, so before that you may have to create it:

Also instead of that folder, you can use a different one.

To un-mount cdrom use:

Tags

Using FIND command in Linux/Unix

This tutorial is dedicated to the ‘find’ command used in Linux/Unix operating systems.
‘Find’ is really powerful and commonly used command which helps in troubleshooting, finding stuff and as a part of server scripts.

The very common usage, just to find a file name or folder on your server is:

This will find all files or folders on a particular server with STRING included in the name located into the current folder and all the subfolder.

The next one will find string in files into the current folder and all the rest subfolders.

or

just for your information another way to find string in files :

Why I am giving you two or more commands?
Take in mind that the find command may be different on a different Linux and Unix based operating systems, and the syntax may differ.

Let’s see if we want to find all files bigger than 5MB:

Or find files bigger than 10MB using different find syntax :

To find user files you may search by ‘User ID’ into the systems (this may take time!)

To find all files modified in the last 5 minutes‘¦

… and if you want them all deleted:

Let’s find directories with certain permissions:

Here is how to find files with same permissions

or

Find files without associated user:

Find files modified and created last two days:

The next command will show you a list of SUID/SGID of programs in your system.

The next ‘find’ string will show you how many directories, files and links has a particular folder.

Note that if you remove the “-follow” ‘find’ parameter it wont search/ trace symlinks (Symbolic links).

With the following command you can find and replace in all files using ‘sed’, from the current folder recursively for a string (in my example ‘mamma mia!’) and will replace it with another which will be ‘daddy dog’.
(For the special characters you have to use so-called ‘escape’ character )

As it is too complicated you can find and replace with FIND and SED

It is very, very useful, but be careful how you are using it. It is a must to have backup, before messing all around!

With the next string one you can do a change on every ‘.php’ file in this case we are going to change the permissions of all files to 644 found inside the current and all of the subfolders.

Hope you liked the ‘find’ command examples. I am using them very often and even that I am referring to this tutorial for fresh ideas.

Think twice cut ones!

Tags

Mount Logical Volume

This tutorial will show you how you can mount logical volume on a server with Fedora operating systems.

If it is already mounted you will see it as VolGroup00-LogVol00 like, or similar in the listing bellow.

How to mount ISO under Linux

This tutorial will show you how to mount ISO format on a computer with Linux Operating System via console.

This can be done with this command: