text file
A file holding only readable characters arranged in lines, such as a .txt, .csv or configuration file, as opposed to a binary file such as an image.
In more detail
Configuration files, source code and logs are text files, which is why they can be opened in any text editor and compared line by line with diff. The characters are stored as bytes using a character encoding, and programs decode them back into text when reading. A .txt ending is only a naming convention that says plain text.
Example
marker.txt in the idempotency lesson is a text file written by the copy module.Related terms
- copy module — The module that puts a file on a host, either copied from the control node or written from content given in the task.
- diff — A listing of the differences between two versions of something, such as two files, two commits or two screenshots.
- character encoding — The rule for turning text characters into bytes and back, such as UTF-8.
- file object — The object returned by open() that you read from or write to, and close when finished.
- bytes object — A Python value holding raw bytes, numbers from 0 to 255, written like b"abc", as opposed to a string of characters.
Taught in
- Installing Ansible — Ansible Configuration Management at Scale
- Modules And Idempotency — Ansible Configuration Management at Scale
- Check Mode And Diff — Ansible Configuration Management at Scale
- Templates With Jinja — Ansible Configuration Management at Scale
- The Host Footprint: Six Doors On A Worker — Certified Kubernetes Security Specialist (CKS) Exam Prep
- AppArmor: The Guard Docker Desktop Does Not Have — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Minimal Base Images: Less To Attack — Certified Kubernetes Security Specialist (CKS) Exam Prep
- Signing And Verifying Images With Cosign — Certified Kubernetes Security Specialist (CKS) Exam Prep
- What A Program Really Is — Hands-on Python: Complete Video Course & Book
- Editors, IDEs And Shells — Hands-on Python: Complete Video Course & Book
- The Idle Editor And Running Programs — Hands-on Python: Complete Video Course & Book
- Files: Writing And Reading — Hands-on Python: Complete Video Course & Book
- pip, requirements, and installing packages — Hands-on Python: Complete Video Course & Book
- Paths And Files The Modern Way — Hands-on Python: Complete Video Course & Book
- Infrastructure As Code, And One Workflow For Every Platform — HashiCorp Terraform Associate (004) Exam Prep
- Providers: How Terraform Reaches Every API — HashiCorp Terraform Associate (004) Exam Prep
- State: Terraform's Memory Of What It Built — HashiCorp Terraform Associate (004) Exam Prep
- Resources, Data Sources And The References Between Them — HashiCorp Terraform Associate (004) Exam Prep
- Expressions And Functions: Making Configuration Compute — HashiCorp Terraform Associate (004) Exam Prep
- Count, For Each And Dynamic Blocks — HashiCorp Terraform Associate (004) Exam Prep
- Dependencies, depends_on And Lifecycle Rules — HashiCorp Terraform Associate (004) Exam Prep
- Custom Conditions: Validation, Pre And Postconditions, Checks — HashiCorp Terraform Associate (004) Exam Prep
- Files: Globs, Copies And Compression — LPIC-1 Linux Administrator (101-500 and 102-500) Exam Prep
- Exam Strategy: The First Fifteen Minutes And ansible-doc — RHCE in Ansible (EX294): Automate Red Hat Systems
- Mock Exam, Part 1: Seven Tasks Across Three Sections — RHCE in Ansible (EX294): Automate Red Hat Systems
- Mock Exam, Part 2: Real Machines And The Patterns That Fail — RHCE in Ansible (EX294): Automate Red Hat Systems
References
Certification courses
- CKS course and practice exam: Certified Kubernetes Security Specialist
- Terraform Associate course and practice exam: HashiCorp Terraform Associate (004)
- LPIC-1 course and practice exam: Linux Administrator (101-500 and 102-500)
- RHCE course and practice exam: Red Hat Certified Engineer in Ansible (EX294)