Skip to content

FileGrouper is a powerful Bash script for organizing and managing files within a directory. It provides various options to group, search, and filter files based on their type, size, or name.

Notifications You must be signed in to change notification settings

redaezziani/FileChief

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Version

FileGrouper

FileGrouper is a powerful Bash script for organizing and managing files within a directory. It provides various options to group, search, and filter files based on their type, size, or name.

Features

  • Group files by type, size, or name
  • Display all files in a directory
  • Search for files matching a specific pattern
  • Get files of a specific size or type

Installation

To install FileGrouper, follow these steps:

  1. Clone the repository:
git clone https://github.com/redaezziani/FileChief.git
  1. Change into the script directory:
cd FileChief/script

Usage

To use FileGrouper, follow these steps:

  1. Make the script executable:
chmod +x fileGrouper.sh
  1. Run the script with the desired options:
./fileGrouper.sh [options]

Available options:

  • -d <directory>: Specify the directory to operate on (required)
  • -t: Group files by type
  • -s: Group files by size
  • -n: Group files by name
  • -a: Display all files in the directory
  • -f <pattern>: Search for files matching the given pattern
  • -z <size>: Get files of the specified size
  • -y <type>: Get files of the specified type

Example usage:

./fileGrouper.sh -d /path/to/directory -t -s

This command will group files in /path/to/directory by both type and size.

Examples

  1. Group files by type:
./fileGrouper.sh -d /path/to/directory -t
  1. Search for files with a .txt extension:
./fileGrouper.sh -d /path/to/directory -f "*.txt"
  1. Get files larger than 10MB:
./fileGrouper.sh -d /path/to/directory -z +10M
  1. Display all regular files in a directory:
./fileGrouper.sh -d /path/to/directory -y f

Caution

Please be careful when using the grouping options (-t, -s, -n) as they will move files into new directories. It's recommended to test the script on a small sample directory first to ensure the desired behavior.

Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.

License

This project is licensed under the MIT License.

Author

FileGrouper was created by reda ezziani . You can find more of my projects on GitHub.

About

FileGrouper is a powerful Bash script for organizing and managing files within a directory. It provides various options to group, search, and filter files based on their type, size, or name.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages