To remove a specific user completely from ACL permissions, use setfacl -x. Remove a user ACL from a file Example: Check: Remove a user ACL from a directory Example: If the directory has default ACLs too For directories, a user may have: Remove both: Or in one command: Remove user ACL recursively To remove that …
Category: Root
May 30
Linux: Regular Permissions (symbolic/numeric) vs ACL
Linux has two main permission layers: 1. Traditional UGO permissions UGO means: Example: means: Another example: means: So 777 is very broad. It gives everyone full access. So: This is usually not safe, especially for shared systems. 2. ACL permissions ACL means Access Control List. ACL lets you give permission to specific extra users or …
May 30
Linux: ACL vs Selinux
ACL vs SELinux ACL and SELinux both control access, but they work at different levels. Feature ACL SELinux Full name Access Control List Security-Enhanced Linux Main purpose Give extra file permissions to specific users/groups Enforce system-wide security policy Access model DAC: Discretionary Access Control MAC: Mandatory Access Control Controlled by File owner/root SELinux policy/root Works …
May 24
Explain the command and each part : Get-Service * | Select-Object Status, DisplayName | Where-Object { $_.Status -eq “Running” -and $_.DisplayName -like “Windows*“ } | Sort-Object DisplayName -Descending | Format-Table -AutoSize
This command lists running Windows services whose display name starts with “Windows”, sorts them by display name in descending order, and displays the result in a neat table. Corrected version: Step-by-step explanation 1. Get-Service * Gets all Windows services on the computer. The * wildcard means: So this returns services such as: 2. Pipeline | …
May 24
Explain: Get-Children and Rename-Item
Below, parent command means the main cmdlet being used: Get-ChildItem or Rename-Item. 1. Get-ChildItem -Path C:\Users\sayed\* -Include *.txt Parent command: Get-ChildItem Get-ChildItem lists files and folders in a location. It is similar to: Your rename-files lab explains that Get-ChildItem returns items from one or more locations and can be combined with filtering parameters such as …
May 24
compare contrast these commands: Get-Disk | Format-Table -Auto Get-PhysicalDisk Get-Partition -DiskNumber 0 Get-Partition -DriveLetter D
These four commands are all disk/partition viewing commands, but they look at different levels of storage. The disk-management lab explains that Get-Disk shows logical disks, Get-PhysicalDisk shows physical disk devices, and Get-Partition is used to view partition information for a disk. Command Main Purpose Level Get-Disk | Format-Table -Auto Shows disks in a clean table …
May 24
Command performs the full setup of a new RAW disk in one PowerShell pipeline:
explain: Get-Disk | Where PartitionStyle -eq “RAW” | Initialize-Disk -PartitionStyle GPT -PassThru | New-Partition -UseMaximumSize -AssignDriveLetter | Format-Volume -FileSystem NTFS -NewFileSystemLabel “MYDATA” This command performs the full setup of a new RAW disk in one PowerShell pipeline: Full meaning Find any uninitialized disk, initialize it as GPT, create one large partition, assign a drive letter, …
May 24
Variations of: Get-Process | Select Name,Id,CPU | Sort CPU -Descending
Yes. These commands produce the same type of output: process Name, Id, and CPU, sorted by CPU in descending order. Variation 1: Full cmdlet names Variation 2: Sort first, then select Variation 3: Use aliases Variation 4: Show only top 10 highest CPU processes Best teaching version: Comment: REF: AI Tools/ChatGPT
May 24
Explain: Get-Process | Select Name,Id,CPU | Sort CPU -Descending
This command shows running processes with selected columns and sorts them by CPU usage/time. Meaning step by step 1. Get-Process Gets all running processes on the computer. 2. Pipeline | Passes the process objects to the next command. 3. Select Name,Id,CPU Short form of: It displays only these properties: Property Meaning Name Process name Id …
May 24
write-output vs write-host
Write-Output vs Write-Host in PowerShell Feature Write-Output Write-Host Sends data to pipeline ✅ Yes ❌ No Can be stored in variable ✅ Yes ❌ Usually no Can be redirected to file ✅ Yes ❌ Not normally useful Used for script output ✅ Recommended ⚠️ Mainly for display messages Supports formatting/color Limited ✅ Good for colors …
