Skip to content

Commit 7c2cc03

Browse files
author
adrianbartyczak
committed
Change main section names and divide section "GNU/Linux"
1 parent 1810650 commit 7c2cc03

File tree

139 files changed

+599
-383
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+599
-383
lines changed

README.md

Lines changed: 36 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -9,67 +9,69 @@
99

1010
**Shell** provides solutions in the following paradigms:
1111

12-
## Applications
12+
## Application management
1313

14-
Solutions for applications
14+
Solutions for managing applications
1515

16-
* [Generic RDBMS utility functions for a MySQL database](functions_scripts/applications/database/mysqldbutils)
17-
* [Check if a PostgreSQL database exists.](one-liners/applications/database/postgresql-database.one-liners)
16+
* [Generic RDBMS utility functions for a MySQL database](functions_scripts/application_management/database/mysqldbutils)
17+
* [Check if a PostgreSQL database exists.](one-liners/application_management/database/postgresql-database.one-liners)
1818

19-
## Programming languages
19+
## Scripting
2020

21-
Solutions for programming languages
21+
Solutions for scripting
2222

23-
* [Bash array utilities](functions_scripts/programming_languages/bash/arrayutils.bash)
24-
* [Bash date and time utilities](functions_scripts/programming_languages/bash/dateandtimeutils.bash)
23+
* [Bash array utilities](functions_scripts/scripting/bash/arrayutils.bash)
24+
* [Bash date and time utilities](functions_scripts/scripting/bash/dateandtimeutils.bash)
2525

26-
## GNU/Linux
26+
## File management
2727

28-
Solutions based on core aspects of the GNU/Linux operating system *(file, system and X11 management, operating system tools, etc.)*, based on three *super* sections:
28+
Solutions for managing files
2929

30-
### 1. Main - performing an action
30+
* [Recursively rename all files matching a name.](scripts/file_management-main/name_manipulation/recren)
31+
* [Get the number of megabytes of one or more files and/or directories.](one-liners/file_management-output/file_information/file-property-information-retrieval.one-liners)
3132

32-
* [Recursively rename all files matching a name.](scripts/gnulinux--main/file_management/recren)
33+
## Hardware management
3334

34-
### 2. Output - providing output only (no actions performed)
35+
Solutions for managing hardware
3536

36-
* [Get the number of megabytes of one or more files and/or directories.](one-liners/gnulinux--output/file_management/general-file-management.one-liners)
37-
* [Get the ID of a window by PID.](scripts/gnulinux--output/x11_management/getwindidbypid)
37+
* [Check if the primary wireless local area network device is soft blocked.](scripts/hardware_management-output/device_information/iswlanblocked)
38+
* [Check if a secondary wireless local area network device is soft blocked.](scripts/hardware_management-output/device_information/issecondarywlanblocked)
3839

39-
### 4. Modules - used in conjuction with command-line programs
40+
## X11 management
4041

41-
* [Execute a command in the background.](scripts/gnulinux--modules/shell_management/execinbg)
42-
* [Execute a command when a file has changed in the current directory.](scripts/gnulinux--modules/file_management/execonfilechange)
42+
Solutions for managing X11
4343

44-
## Utilities
44+
* [Get the name of the active window.](scripts/x11_management-output/window_property_information/getactvwindname)
45+
* [Get the ID of a window by PID.](scripts/x11_management-output/window_property_information/getwindidbypid)
4546

46-
Solutions performing a utility function, based on two *super* sections:
47+
## Shell management
4748

48-
### 1. Main - performing an action
49+
Solutions for managing the shell
4950

50-
* [Execute a command in a new terminal emulator.](scripts/utilities--main/general_program_management/execinnewterm)
51-
* [Recursively replace a string in all files.](scripts/utilities--main/general_text_manipulation/recrep)
51+
* [Execute a command in the background.](scripts/shell_management-modules/process_management/execinbg)
52+
* [Remove the last N bash history entries.](scripts/shell_management-main/history_management/remlastnbashhistentries)
5253

53-
### 2. Modules - used in conjuction with command-line programs
54+
## Mobile device management
5455

55-
* [Recursively find a file or directory for a command.](scripts/utilities--modules/general_program_management/findfileforcmd)
56+
Solutions for managing mobile devices
5657

57-
---
58+
* [Watch and print the X and Y screen tap coordinates of an Android device.](scripts/mobile_device_management-android/hardware_management/getmobilescreentappos)
59+
* [Mount and unmount an MTP device.](scripts/mobile_device_management-generic/management/mntmtp)
5860

59-
Shell has an [extension repository for utilities consisting of more than one file](https://github.com/unixfoundation/shell.packaged-utilities).
61+
## Utilities
6062

61-
## Mobile
63+
Solutions performing a utility function, based on two *super* sections:
6264

63-
Solutions for mobile devices, based on two *super* sections:
65+
### 1. Main - performing an action
6466

65-
### 1. Android - for Android devices
67+
* [Execute a command in a new terminal emulator.](scripts/utilities-main/general_program_management/execinnewterm)
68+
* [Recursively replace a string in all files.](scripts/utilities-main/general_text_manipulation/recrep)
6669

67-
* [Send an sms using an Android device.](scripts/mobile--android/utilities/sendsms)
68-
* [Watch and print the X and Y screen tap coordinates of an Android device.](scripts/mobile--android/hardware_management/getmobilescreentappos)
70+
### 2. Modules - used in conjuction with command-line programs
6971

70-
### 2. Generic - for all mobile devices
72+
* [Recursively find a file or directory for a command.](scripts/utilities-modules/general_program_management/findfileforcmd)
7173

72-
* [Mount and unmount an MTP device.](scripts/mobile--generic/management/mntmtp)
74+
*Shell has an [extension repository for utilities consisting of more than one file](https://github.com/unixfoundation/shell.packaged-utilities).*
7375

7476
# Contributing
7577

aliases/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
# aliases/
2+
# Aliases
33

44
This directory contains aliases and frequently used short functions.
55

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
# File management - main
3+
4+
## File permissions
5+
6+
* [**Single permission change aliases**](file_permissions/single-permission-change.aliases)
7+
* [**Multiple permission change aliases**](file_permissions/multiple-permission-change.aliases)
8+
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#
2+
# File:
3+
# multiple-permission-change.aliases
4+
#
5+
# Description:
6+
# Multiple permission change aliases
7+
#
8+
9+
alias permusergroupreadwrite='chmod ug+rw' # permusergroupreadwrite: give the user and group read and write permissions to a file.
10+
alias permusergroupreadwritexec='chmod ug+rwx' # permusergroupreadwriteexec: give the user and group read, write and execute permissions to a file.
11+

aliases/gnulinux--main/file_management/file-permissions-file-management.aliases renamed to aliases/file_management-main/file_permissions/single-permission-change.aliases

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
#
22
# File:
3-
# file-permissions-file-management.aliases
3+
# single-permission-change.aliases
44
#
55
# Description:
6-
# File permissions file management aliases
6+
# Single permission change aliases
77
#
88

99
alias permreadonly='chmod a-w' # permreadonly: change the permisson status of a file to read-only
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
2+
# File management - output only
3+
4+
## Directory information
5+
6+
* [**Directory context information retrieval aliases**](directory_information/directory-context-information-retrieval.aliases)
7+
8+
## File finding
9+
10+
* [**First match file finding aliases**](file_finding/first-match-file-finding.aliases)
11+
* [**Single step file finding aliases**](file_finding/single-step-file-finding.aliases)
12+
* [**Text based file finding aliases**](file_finding/text-based-file-finding.aliases)
13+
14+
## File permission information
15+
16+
* [**Recursive file permission information retrieval aliases**](file_permission_information/recursive-file-permission-information-retrieval.aliases)
17+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#
2+
# File:
3+
# directory-context-information-retrieval.aliases
4+
#
5+
# Description:
6+
# Directory context information retrieval aliases
7+
#
8+
9+
alias numfiles='echo "$(ls -1 | wc -l)"' # numfiles: print the number of non-hidden files and directories in the current directory
10+
Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,16 @@
11
#
22
# File:
3-
# general-file-management.aliases
3+
# first-match-file-finding.aliases
44
#
55
# Description:
6-
# General file management aliases
6+
# First match file finding aliases
77
#
88

9-
FILE AND DIRECTORY FINDING:
10-
11-
ff() { find . -type f -name "*${1}*"; } # ff: recursively find all files matching a name name; $1: file name
12-
fd() { find . -type d -name "*${1}*"; } # fd: recursively find all directories matching a name name; $1: directory name
13-
ffgr() { /usr/bin/grep -l -R "${1}" .; } # ffgr: recursively find all files containing a given text; $1: text to search
14-
159
fff() { find . -type f -name "*${1}*" -print -quit; } # fff: recursively find the first file matching a name; $1: file name
1610
fdf() { find . -type d -name "*${1}*" -print -quit; } # fdf: recursively find the first directory matching a name; $1: directory name
1711
fffa() { find "$PWD" -type f -name "*${1}*" -print -quit; } # fffa: recursively find the first file matching a name and return its absolute path; $1: file name
1812
fdfa() { find "$PWD" -type d -name "*${1}*" -print -quit; } # fdfa: recursively find the first directory matching a name and return its absolute path; $1: directory name
13+
1914
ffd() { echo "$(find . -type f -name "*${1}*" -exec sh -c 'echo "${1%/*}"; \
2015
kill "$PPID"' sh {} \;)" ;} # ffd: recursively find the first file matching a name and return its parent directory; $1: file name
2116

22-
DIRECTORY INFORMATION:
23-
24-
alias numf='echo "$(ls -1 | wc -l)"' # numf: print the number of non-hidden files and directories in the current directory
25-
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#
2+
# File:
3+
# single-step-file-finding.aliases
4+
#
5+
# Description:
6+
# Single step file finding aliases
7+
#
8+
9+
ff() { find . -type f -name "*${1}*"; } # ff: recursively find all files matching a name name; $1: file name
10+
fd() { find . -type d -name "*${1}*"; } # fd: recursively find all directories matching a name name; $1: directory name
11+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#
2+
# File:
3+
# text-based-file-finding.aliases
4+
#
5+
# Description:
6+
# Text based file finding aliases
7+
#
8+
9+
ffgr() { /usr/bin/grep -l -R "${1}" .; } # ffgr: recursively find all files containing a given text; $1: text to search
10+

0 commit comments

Comments
 (0)