Started with linux file management - Today spent time going deeper into file handling, not just basic commands. Worked around some permission edge cases - changing ownership vs group and how that actually affects access in multi-user scenarios. Used chown and chgrp properly instead of treating them the same. chmod with numeric values makes more sense now when thinking in terms of 4,2,1 - way better than guessing 755/644. umask finally clicked - it’s not setting permissions, it’s removing from the defaults. So new file/dir permissions don’t feel random anymore. Also tested differences while copying and moving files. Like how permissions and structure behave during operations, and how recursive (-r) actually applies on nested directories. Compression part got clearer after trying it: - tar for bundling - then compression like gzip on top of it So the flow is: archive → compress, not mixing both. Also tried moving files across locations and handling structure changes. With that pushed all the raw notes to a github repo for future reference - https://lnkd.in/gAMG76Q2 #devops #linux
Mastering Linux File Management with Chown, Chgrp, and Umask
More Relevant Posts
-
Day 28/100: Bundling It Up – Archiving & Compression in Linux 🗜️📦 Today’s Focus: In a real-world DevOps environment, servers generate massive amounts of log files and data (like the Jenkins logs I was working with today!). To save disk space and make transferring files over a network much faster, I learned how to properly archive and compress directories using the Linux CLI. 🛠️ The Tools I Mastered: I practiced bundling multiple files into a single archive and applying compression algorithms to shrink their size: The Mighty tar (Tape Archive): This is the undisputed king of Linux archiving. I learned the classic command flag combinations: tar -czvf archive.tar.gz [directory]: This creates a new archive (-c), compresses it using gzip (-z), shows me the progress verbosely (-v), and outputs it to a file (-f). tar -xzvf archive.tar.gz: The exact opposite! This extracts (-x) the compressed tarball back into a usable directory. I also explored the manual to see other powerful compression options like -j for bzip2 and -J for xz. zip & unzip: I also practiced using the standard zip -r command to recursively compress a directory. While tar is the Linux standard, zip is incredibly useful when I need to share artifacts with Windows environments! Why It Matters: Whether it is backing up application configurations, rotating system logs, or packaging up a build artifact to deploy to a server, we rarely move raw directories around. Compressing everything into a single "tarball" saves bandwidth, storage, and time! ⏳ #100DaysOfDevOps #100DaysOfCode #Linux #Tarball #SysAdmin #CentOS #Vagrant #CLI #DevOpsEngineer #TechJourney #DailyProgress #CloudComputing
To view or add a comment, sign in
-
Day 17/100: Mastering File & Directory Management in Linux Today’s Focus: After getting comfortable navigating the Linux file system, today was all about creating, moving, and managing files and directories directly from the command line. Being able to quickly structure a workspace without leaving the terminal is a massive productivity boost! 🛠️ The Core Commands I Practiced: Here is a breakdown of the essential file management tools I added to my toolkit today: mkdir (Make Directory): Used this to quickly spin up new folders for my environments, like dev, ops, and bakupdir. You can even create multiple directories at once! touch: The go-to command for creating empty files or updating file timestamps. cp (Copy): Used for duplicating files or entire directories from one location to another. mv (Move/Rename): The Swiss Army knife for either relocating files to a new directory or simply renaming them in place. 💡 Pro-Tip of the Day: Brace Expansion Instead of typing out touch ten different times to create test files, I learned how to use shell brace expansion! Running touch devopsfile{1..10}.txt instantly generated 10 sequentially numbered files in a single second. It is small automation tricks like this that make the CLI so powerful. On to the next challenge! #100DaysOfDevOps #100DaysOfCode #Linux #CentOS #Vagrant #CLI #SysAdmin #DevOpsEngineer #TechJourney #DailyProgress #CloudComputing
To view or add a comment, sign in
-
-
Arch Linux now has a bit-for-bit reproducible Docker image under the repro tag. Reproducible base images are essential for the supply chain. Other distros are pretty opaque on this. Worth watching as a model. https://lnkd.in/gp2QbCc5
To view or add a comment, sign in
-
Two identical files. Delete one… nothing happens. Delete the other… everything breaks. That’s the difference between hard links and symbolic links (soft links) in Linux. A file isn’t actually the data itself. It’s just a reference to where that data lives on disk (an inode). An inode is basically the metadata that points to the file’s actual data. A hard link points directly to that inode. It’s basically another name for the same file. Delete one, and the data is still there. It only disappears when all links are gone. A soft link is different. It points to the file path, not the inode. So it’s more like a shortcut. If the original file is deleted, the link breaks. It’s a small concept, but it catches a lot of people out. Especially when you’re debugging something and realise you’ve been deleting the wrong “file”. What’s a Linux concept that didn’t click at first, but suddenly made sense later? #Linux #DevOps #CloudEngineering
To view or add a comment, sign in
-
-
Day 20/100: Mastering Text Filtering with Grep in Linux 🔎 Today’s Focus: As my Linux environments grow, sifting through massive configuration files and logs line-by-line is no longer an option. Today, I unlocked one of the most powerful and famous tools in a SysAdmin's arsenal: Data filtering using grep (Global Regular Expression Print). 🛠️ The Commands I Added to My Toolkit: grep allows you to search for specific patterns of text within files. Here is how I am using it to instantly find exactly what I need: grep "pattern" filename: The standard command to search for a specific word or string inside a file. It outputs the entire line where the match is found. grep -i (Case-Insensitive): Linux is highly case-sensitive. Adding the -i flag ensures I find my target whether it is written as "Error", "ERROR", or "error". grep -R or -r (Recursive Search): Instead of searching a single file, this flag allows me to search through an entire directory and all of its subdirectories to hunt down a specific string. grep -iR (The Ultimate Combo): Combining these flags lets me search for a case-insensitive string across a massive directory structure. This is absolutely perfect for hunting down hidden configurations across my Vagrant environments! Why It Matters: When a server misbehaves or a pipeline fails, finding the root cause hidden inside thousands of lines of system logs is like finding a needle in a haystack. grep is the magnet that pulls the needle right out! 🧲 #100DaysOfDevOps #100DaysOfCode #Linux #Grep #Vagrant #CLI #SysAdmin #DevOpsEngineer #TechJourney #DailyProgress #CloudComputing #LinuxCommands
To view or add a comment, sign in
-
-
𝐃𝐚𝐲 𝟑𝟒= 𝐋𝐢𝐧𝐮𝐱 𝐒𝐞𝐫𝐢𝐞𝐬 = 𝐒𝐭𝐨𝐩 𝐰𝐨𝐫𝐤𝐢𝐧𝐠 𝐢𝐧 𝐚 𝐜𝐥𝐮𝐭𝐭𝐞𝐫𝐞𝐝 𝐭𝐞𝐫𝐦𝐢𝐧𝐚𝐥! The simplest fix? The clear command. Link to original video: https://lnkd.in/gQj5xgJK Does your terminal look like a chaotic mess of old commands and directory lists? When you're deep into a #DevOps workflow or debugging code, a messy screen isn't just annoying—it’s a distraction. It's easy to lose track of which path you're in or what the last output was Just type clear and hit enter. Simple, effective, and essential for every Linux user. What’s your most-used Linux shortcut? Let’s hear it in the comments! 👇 #Linux #DevOps #CodingTips #SoftwareEngineering #TechHacks #Terminal #CloudComputing
To view or add a comment, sign in
-
-
Four Borg backup gotchas I learned the hard way — all publicly documented, but rarely surfaced in introductory writing: 1) `apt install borgbackup` is broken on modern Ubuntu. msgpack version constraints in the package are too loose; it installs cleanly, fails on every backup with "unsupported msgpack version." Fix: static binary from https://lnkd.in/emrTjScm, verified with the project's GPG signing key. Ubuntu bug 2073401, Borg issue #4959. 2) `borg create | tee log` hangs forever with encryption enabled. Pipe steals the controlling terminal, Borg cannot prompt for the passphrase, SIGTTIN with no error. Fix: process substitution `> >(tee log)`. Better: BORG_PASSCOMMAND with `secret-tool` from libsecret — passphrase loads from your unlocked keyring, never appears in env vars or process listings. 3) `--exclude '**/node_modules'` matches nothing. Borg's default exclude pattern style is `fm:` (fnmatch, no recursive wildcards), not shell glob. Use the `sh:` prefix: `--exclude 'sh:**/node_modules'`. Documented in `borg help patterns`. 4) `sudo borg` poisons your user cache. Chunk-index in `~/.cache/borg` becomes root-owned, your next non-sudo run fails with permission denied. Either chown back at the end of your script, or don't run Borg under sudo at all. These four explain most of the "Borg doesn't work" threads on StackOverflow. Once you know them, Borg is rock-solid — daily snapshots for over a year, zero failed backups, ~18× dedup ratio. Full layered storage playbook (Reclaim → Archive → Backup → Off-site, plus a systemd timer) on m3mo Bytes. Link in first comment. #Linux #Borg #BackupStrategy #DevOps #DataIntegrity
To view or add a comment, sign in
-
-
Day 19/100: Decoding Linux File Types 🗂️ Today’s Focus: In Linux, the phrase "everything is a file" is taken literally. Even hardware components, directories, and processes are treated as files! Today, I explored how to identify different file types by looking at the very first character in the ls -l command output. 🔍 The Linux File Type Breakdown: When you list files with detailed permissions, that first letter tells you exactly what you are dealing with: - (Regular File): Your standard files. This includes text files (like my Vim files from yesterday!), scripts, images, and binary executables d (Directory): A folder containing other files or directories. c (Character Device): Hardware components that transfer data character-by-character (unbuffered). This represents devices like your keyboard, mouse, or system terminals. b (Block Device): Hardware components that transfer data in bulk "blocks" (buffered). Think of storage components like hard drives, SSDs, or USB drives. l (Symbolic Link): A shortcut or pointer that links to another file or directory on the system. Why This Matters: As a DevOps engineer or SysAdmin, knowing how to instantly recognize if you are looking at a system directory, a raw hard disk (b), or a terminal interface (c) is essential for secure system administration and troubleshooting. #100DaysOfDevOps #100DaysOfCode #Linux #Vagrant #CLI #SysAdmin #DevOpsEngineer #TechJourney #DailyProgress #CloudComputing #LinuxCommands
To view or add a comment, sign in
-
When working with Linux systems, finding the right data is half the battle… especially when logs are huge and messy. These commands help you search, filter, and extract exactly what you need: 🔹 find . -type f -name "*.log" → Finds all .log files in current directory 🔹 grep -r "error" /var/log → Searches for "error" across log files recursively 🔹 grep -v "INFO" logfile → Excludes lines containing "INFO" 🔹 sort logfile | uniq → Sorts and removes duplicate entries 🔹 cut -d':' -f1 /etc/passwd → Extracts specific fields (like usernames) These are the kind of commands that save time when you're debugging real issues…because in production, speed + accuracy matters. #Linux #LinuxCommands #DevOps #SystemAdmin #Troubleshooting
To view or add a comment, sign in
-
-
🚨 Permission denied error in Linux? Here’s how I debug it You try to access a file or run a command… And get: “Permission denied” 😓 Very common issue in Linux. Instead of guessing, here’s a simple approach 👇 --- 🔍 1. Check file permissions `ls -l file.txt` 👉 Example output: `-rw-r--r--` 👉 Understand: * Owner * Group * Others --- 👤 2. Check file ownership 👉 Who owns the file? `ls -l` 👉 Maybe you are not the owner --- 🔑 3. Fix permissions (if needed) `chmod 755 file.sh` 👉 Gives execute permission --- 👥 4. Change ownership `chown user:user file.txt` 👉 Assign correct owner --- ⚙️ 5. Check sudo access 👉 Need elevated permissions? `sudo command` --- 📂 6. Check directory permissions 👉 Even if file is fine, parent directory may block access --- 💡 Common reasons: * No execute permission * Wrong owner * Restricted directory * Missing sudo rights --- 🧠 Real mindset: Don’t just run sudo everywhere ❌ Understand why permission is denied ✅ --- 💡 Final thought: Permissions are security in Linux. Once you understand them, half of your problems get solved 🚀 --- #Linux #LinuxAdmin #DevOps #Troubleshooting #CloudComputing #SystemAdministration #LearningInPublic #ITInfrastructure
To view or add a comment, sign in
Explore content categories
- Career
- Productivity
- Finance
- Soft Skills & Emotional Intelligence
- Project Management
- Education
- Technology
- Leadership
- Ecommerce
- User Experience
- Recruitment & HR
- Customer Experience
- Real Estate
- Marketing
- Sales
- Retail & Merchandising
- Science
- Supply Chain Management
- Future Of Work
- Consulting
- Writing
- Economics
- Artificial Intelligence
- Employee Experience
- Workplace Trends
- Fundraising
- Networking
- Corporate Social Responsibility
- Negotiation
- Communication
- Engineering
- Hospitality & Tourism
- Business Strategy
- Change Management
- Organizational Culture
- Design
- Innovation
- Event Planning
- Training & Development