Search in directories on ubuntu

image_pdfimage_print

Locating Files by Name

The most common use of find is in the search for a specific file by use of its name. The following command searches the home directory and all of its subdirectories looking for the file mysong.ogg:

 

It is important to get into the habit of quoting patterns in your search as seen above or your search results can be a little unpredictable. Such a search can be much more sophisticated though. For example if you wished to search for all of the ogg files in your home directory, some of which you think might be named ‘OGG’ rather than ‘ogg’, you would run:

 

Here the option ‘-iname’ performs a case-insensitive search while the wildcard character ‘*’ matches any character, or number of characters, or zero characters. To perform the same search on your entire drive you would run:

 

This could be a slow search depending on the number of directories, sub-directories and files on your system. This highlights an important difference in the way that find operates in that it examines the system directly each time unlike programs like locate or slocate which actually examine a regularly updated database of filnames and locations.

remove dir bash command

image_pdfimage_print

Remove / Delete directory called /tmp/foo

Open the terminal. Type the following command:

$ rmdir /tmp/foo

Recursive removal

Remove all files and directories (recursive removal):

$ rm -rf /path/to/directory
$ rm -rf /tmp/foo

Please note that you can also pass -p option to rmdir command. Each directory argument is treated as a pathname of which all components will be removed, if they are empty, starting with the last most component:

$ rmdir -p /tmp/x/y/z

get courses

image_pdfimage_print

moodle smtp settings configuration on php

image_pdfimage_print

http://kutayzorlu.com/angefg.wordpress.com/2011/01/29/education-sur-opensim-avec-moodle-et-sloodle/

login script moodle

image_pdfimage_print