Operating Systems & Administration
[Day 2] 2. Some more commands
D
DITISS AdminFile Information Using stat
statTo retrieve specific information about a file, you can use the
stat-
Basic Usage:
stat -c "%n, %F" file.txt- Output:
file.txt, regular empty file - Description: Displays the file name and type.
- Output:
-
Detailed Usage:
stat -c "name = %n, type of file = %F" file.txt- Output:
name = file.txt, type of file = regular empty file - Description: Shows the file name and its type in a more descriptive format.
- Output:
Creating Shortcuts with alias
aliasThe
alias-
Creating an Alias:
alias ll='ls -la'-
Explanation:
- : Command used to define a shortcut.
alias - : Name of the shortcut you want to create.
ll - : The actual command that will be executed when you type
'ls -la'.ll
-
Benefit: Instead of typing
every time, you can simply typels -la.ll
-
-
Viewing Existing Aliases:
alias- Description: Displays a list of all current aliases.
-
Removing an Alias:
unalias <aliasname>- Description: Removes the specified alias from your session.
Read Next
8/26/2026
[Day 2] 3. Process Management
!3. ProcessManagement.png **Process**: Running an instance of a program. **Program**: A set of instructions for the machine (CPU). ### Compil...
8/26/2026
[Day 2] 4. Executable File
!4. Executable File.png ### **Executable File Structure** An executable file contains several key sections, each serving a specific purpose:...