File Tools

Note: Use command line flags to prefix scripts with multiple parameters. (For example: -d or -p or ...) Search for a module that will do this function.

Project #1

List all of the files in a directory tree:

Project #2

List all of the files in a directory tree that match a regular expression pattern:

Project #3

List all of the files in a directory tree owned by a specified user:

Project #4

List all of the files in a directory tree >= to a specified size:

Project #5

Rename all of the files in a directory or directory tree:

Project #6

Search a directory or directory tree for files:

Project #7

Given two directories:

Given N directories:

Project #8

Count the words in a text file and display statistics.

What is a word?

The program should do the following:

Download and use the text files for testing:

Note: Search for Python functions and methods that can split a line of text into individual words.

Project #9

Search text files in a directory for a string pattern.

This will be a limited version of the Linux GREP utility.

The program should do the following:

An example of possible output

---------- My Grep Utility -----------------------

Enter regexp search pattern [error] : xyz

Enter regexp file name pattern [\.py$] :

==================================================
Start time      = Dec 8 2007 23:41:45
File pattern    = \.py$
Directory       = ./
String pattern  = xyz
==================================================
xyz.py[7]  import xyzconfig as ABC
xyzconfig.py[2]  # configuration parameters for xyz
==================================================
Dirs processed  = 1
Files processed = 61
Lines matched   = 2
Lines processed = 3090
==================================================

After it is working try adding ...