User Tools

Site Tools


bash:files

BASH - Files

Add up the numbers at a specific position in a file

Change date/time of a file to right now

Check if a File exists

Cleaning Log Files

Combine files

Copy files to different directory

Count the lines in a file

Count the lines in a file that have a specific string

Create a blank file

Delete a field from each line in a file

Delete a line that matches a pattern

Delete carriage returns from a file

Delete duplicate files

Delete duplicate lines from a file

Delete empty files

Delete empty lines

Delete files recursively

Delete files with control characters in their filenames

Delete leading whitespace (spaces or tabs) from front of each line in a file

Delete leading and trailing whitespace from each line in a file

Delete trailing whitespace (spaces or tabs) from end of each line in a file

Difference between a copy of a file and a hard link

Display a specific field in a file if it starts with a number

Display a specific field of each line in a file

Display a specific line in a file

Display every line in a file between one string and another

Display every line in a file matching the regular expression

Display every line in a file prefixed with a line number

Display every line in a file with a specific number of characters

Display file using formatting

Display lines in a file from a starting line through to an ending line

Display the first few lines of a file

Display the last field of each line of the file

Display the last line of a file

Display uncommented lines of a file

DOS2UNIX

Extract specific file(s) from tar.gz

Find all files greater than a certain size

Find filenames with spaces at the end

Find & Replace a String within a File

Insert blank spaces at beginning of each line in a file

List files by size

List files excluding some files

Manage a file whose name starts with a hyphen (-), or a double hyphen (--)

Parse a line from a file

Read a file

Rename duplicate files

Rename files which contain the old sub-string, replacing it with the replacement sub-string

Rename multiple files

Rename spaces in a filename with hyphens

Replace all occurrences of string within a file

Search files for specific text

Split big files

Swap fields in a file

UNIX2DOS

Validate checksum of a file


bash/files.txt · Last modified: 2022/06/13 12:51 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki