File Management
Advanced Windows file operations, permissions, and network drives for Linux users familiar with command-line file management.
File Explorer Overview
File Explorer vs Linux File Managers
| Feature | Windows (File Explorer) | Linux (Nautilus/Dolphin) |
|---|---|---|
| Open | Windows + E | Super + F or click Files |
| Address bar | Shows path with \ | Shows path with / |
| Quick access | Pinned folders | Bookmarks/Places |
| Search | Built-in search | Built-in search |
| Tabs | Windows 11 only | Available in most |
| Multiple panes | Not built-in | Available in some |
File Explorer Navigation
| Action | Shortcut | Linux Equivalent |
|---|---|---|
| Go to parent folder | Alt + ↑ or click up arrow | Alt + ↑ |
| Go back | Alt + ← or back button | Alt + ← |
| Go forward | Alt + → or forward button | Alt + → |
| Refresh | F5 | F5 or Ctrl + R |
| Address bar | Ctrl + L or Alt + D | Ctrl + L |
| Search | Ctrl + F | Ctrl + F |
File System Structure
Drive Letters vs Mount Points
| Concept | Windows | Linux | Example |
|---|---|---|---|
| Root | Each drive has own root | Single root / | C:\ vs / |
| System drive | Usually C:\ | Usually / | C:\Windows vs /usr |
| User home | C:\Users\username | /home/username | C:\Users\john vs /home/john |
| Programs | C:\Program Files | /usr/bin, /opt | Applications location |
| System config | C:\Windows\System32 | /etc, /usr/share | Configuration files |
| Temporary | C:\Windows\Temp, %TEMP% | /tmp | Temporary files |
Important Windows Directories
| Windows Path | Purpose | Linux Equivalent |
|---|---|---|
C:\Windows\ | System files | /usr/, /lib/ |
C:\Program Files\ | 64-bit applications | /usr/bin/, /opt/ |
C:\Program Files (x86)\ | 32-bit applications | /usr/bin/ (32-bit) |
C:\ProgramData\ | Application data | /usr/share/, /var/lib/ |
C:\Users\username\AppData\ | User application data | ~/.config/, ~/.local/ |
C:\Users\username\Documents\ | User documents | ~/Documents/ |
C:\Users\username\Desktop\ | Desktop files | ~/Desktop/ |
File Operations
Basic File Operations
| Task | Windows | Linux Command | Notes |
|---|---|---|---|
| Copy files | Ctrl + C, Ctrl + V | cp source dest | GUI vs command |
| Move files | Ctrl + X, Ctrl + V | mv source dest | Cut and paste |
| Delete files | Delete key | rm file | To Recycle Bin |
| Permanent delete | Shift + Delete | rm file | Bypass Recycle Bin |
| Select all | Ctrl + A | N/A (command line) | In GUI |
| Properties | Alt + Enter | ls -l, stat | File details |
Command Line File Operations
| Task | Windows Command | Linux Equivalent | PowerShell |
|---|---|---|---|
| List files | dir | ls | Get-ChildItem |
| Copy file | copy source dest | cp source dest | Copy-Item |
| Move file | move source dest | mv source dest | Move-Item |
| Delete file | del filename | rm filename | Remove-Item |
| Create directory | mkdir dirname | mkdir dirname | New-Item -ItemType Directory |
| Remove directory | rmdir dirname | rmdir dirname | Remove-Item |
| Show file content | type filename | cat filename | Get-Content |
Advanced File Operations
| Task | Windows Method | Linux Equivalent |
|---|---|---|
| Find files | Search box, where command | find, locate |
| File size | Properties, dir | ls -lh, du |
| Disk usage | Properties of drive | df -h, du -sh |
| File attributes | attrib command | ls -la, stat |
| Compare files | fc command | diff, cmp |
File Permissions & Security
NTFS Permissions vs Linux Permissions
| Permission Level | Windows NTFS | Linux (rwx) | Description |
|---|---|---|---|
| Read | Read | r (4) | View file content |
| Write | Write | w (2) | Modify file content |
| Execute | Execute | x (1) | Run executable files |
| Full Control | Full Control | rwx (7) | All permissions |
| Modify | Modify | rw (6) | Read and write |
| Read & Execute | Read & Execute | rx (5) | Read and run |
Managing Permissions (GUI)
- Right-click file/folder → Properties
- Security tab
- Edit permissions
- Add/remove users and groups
Linux Equivalent: chmod, chown, chgrp commands
Managing Permissions (Command Line)
| Task | Windows Command | Linux Equivalent |
|---|---|---|
| View permissions | icacls filename | ls -l filename |
| Grant permission | icacls filename /grant user:F | chmod +rwx filename |
| Remove permission | icacls filename /remove user | chmod -rwx filename |
| Change owner | takeown /f filename | chown user filename |
| Inherit permissions | icacls filename /inheritance:e | Default behavior |
Common Permission Scenarios
| Scenario | Windows NTFS | Linux Equivalent |
|---|---|---|
| Private file | Owner: Full Control, Others: None | chmod 600 file |
| Shared readable | Users: Read, Owner: Full Control | chmod 644 file |
| Executable | Add Execute permission | chmod +x file |
| Folder access | Full Control on folder | chmod 755 directory |
Symbolic Links & Junctions
Link Types in Windows
| Type | Windows Name | Linux Equivalent | Command |
|---|---|---|---|
| Symbolic Link | Symlink | Symbolic link | mklink linkname target |
| Hard Link | Hard Link | Hard link | mklink /h linkname target |
| Junction | Junction | Mount bind | mklink /j linkname target |
Creating Links
| Link Type | Windows Command | Linux Equivalent |
|---|---|---|
| File symlink | mklink linkname target | ln -s target linkname |
| Directory symlink | mklink /d linkname target | ln -s target linkname |
| Hard link | mklink /h linkname target | ln target linkname |
| Junction | mklink /j linkname target | mount --bind target linkname |
PowerShell Link Commands
# Create symbolic link
New-Item -ItemType SymbolicLink -Path "linkname" -Target "target"
# Create hard link
New-Item -ItemType HardLink -Path "linkname" -Target "target"
# Create junction
New-Item -ItemType Junction -Path "linkname" -Target "target"
Network Drives & Sharing
Mapping Network Drives
| Method | Windows | Linux Equivalent |
|---|---|---|
| GUI | File Explorer → Map network drive | Files → Other locations |
| Command | net use Z: \\server\share | mount -t cifs \\server\share /mnt |
| PowerShell | New-PSDrive | mount command |
Network Drive Commands
| Task | Windows Command | Linux Equivalent |
| ---------------------- | ------------------------------------------- | ----------------------------------- | ---------- |
| Map drive | net use Z: \\server\share | mount -t cifs \\server\share /mnt |
| List mapped drives | net use | mount | grep cifs |
| Disconnect drive | net use Z: /delete | umount /mnt/share |
| Persistent mapping | net use Z: \\server\share /persistent:yes | Add to /etc/fstab |
Sharing Folders
- Right-click folder → Properties
- Sharing tab → Advanced Sharing
- Share this folder
- Set permissions
Linux Equivalent: Samba configuration, NFS exports
File Sharing Protocols
| Protocol | Windows Support | Linux Support | Use Case |
|---|---|---|---|
| SMB/CIFS | Native | Via Samba | Windows file sharing |
| NFS | Client only | Native | Unix file sharing |
| FTP | Client/Server | Client/Server | File transfer |
| SSH/SFTP | Via tools | Native | Secure file transfer |
Hidden Files & System Files
Viewing Hidden Files
| Method | Windows | Linux |
|---|---|---|
| GUI toggle | View → Hidden items | Ctrl + H |
| Command line | dir /a | ls -la |
| Show system files | Folder Options → View | ls -la (all visible) |
File Attributes
| Attribute | Windows | Linux Equivalent |
|---|---|---|
| Hidden | H attribute | Files starting with . |
| System | S attribute | No direct equivalent |
| Read-only | R attribute | chmod -w |
| Archive | A attribute | No direct equivalent |
Managing File Attributes
| Task | Windows Command | Linux Equivalent |
|---|---|---|
| View attributes | attrib filename | ls -la filename |
| Hide file | attrib +h filename | mv file .file |
| Unhide file | attrib -h filename | mv .file file |
| Make read-only | attrib +r filename | chmod -w filename |
| Remove read-only | attrib -r filename | chmod +w filename |
File Search & Indexing
Windows Search
| Method | Access | Linux Equivalent |
|---|---|---|
| Start menu search | Type in Start menu | Launcher search |
| File Explorer search | Search box in Explorer | Find command |
| Everything (third-party) | Fast file search | locate, find |
Search Indexing
- Windows: Automatic indexing of common locations
- Linux:
updatedbfor locate database
Search Commands
| Task | Windows | Linux |
|---|---|---|
| Find files by name | where filename | find / -name filename |
| Find in content | Built into search | grep -r "text" /path |
| Fast filename search | Everything tool | locate filename |
File Compression & Archives
Archive Formats
| Format | Windows Support | Linux Support | Notes |
|---|---|---|---|
| ZIP | Native | Native | Most common |
| RAR | Third-party | Third-party | Popular but proprietary |
| 7Z | 7-Zip tool | p7zip | High compression |
| TAR | Third-party/WSL | Native | Unix standard |
| GZ | Third-party/WSL | Native | Gzip compression |
Archive Commands
| Task | Windows | Linux |
|---|---|---|
| Create ZIP | Right-click → Send to → Compressed folder | zip archive.zip files |
| Extract ZIP | Right-click → Extract All | unzip archive.zip |
| Create TAR | WSL: tar -czf | tar -czf archive.tar.gz files |
| Extract TAR | WSL: tar -xzf | tar -xzf archive.tar.gz |
PowerShell Archive Commands
# Create ZIP archive
Compress-Archive -Path "files" -DestinationPath "archive.zip"
# Extract ZIP archive
Expand-Archive -Path "archive.zip" -DestinationPath "destination"
Advanced File Management
File System Tools
| Tool | Purpose | Linux Equivalent |
|---|---|---|
| chkdsk | Check disk for errors | fsck |
| defrag | Defragment hard drive | Not needed (ext4) |
| sfc | System file checker | debsums (Debian) |
| DISM | System image management | Package manager |
Disk Management
Windows + X → Disk Management
Linux Equivalent: fdisk, parted, gparted
File Recovery
| Scenario | Windows | Linux |
|---|---|---|
| Recycle Bin | Restore from Recycle Bin | No built-in (use trash) |
| Deleted files | File recovery tools | testdisk, photorec |
| Previous versions | File History, Shadow Copies | Backups, snapshots |
Command Line File Management Tips
PowerShell File Operations
# Get file information
Get-ChildItem -Force # Show hidden files
Get-ChildItem -Recurse # Recursive listing
# Find files
Get-ChildItem -Recurse -Filter "*.txt"
Get-ChildItem -Recurse | Where-Object {$_.Extension -eq ".log"}
# File operations
Copy-Item "source" "destination" -Recurse
Move-Item "source" "destination"
Remove-Item "file" -Force
Useful Aliases
PowerShell includes Linux-like aliases:
ls→Get-ChildItemcp→Copy-Itemmv→Move-Itemrm→Remove-Itemcat→Get-Content
Path Considerations for Linux Users
- Backslashes: Windows uses
\instead of/ - Drive letters:
C:\pathinstead of/path - Case insensitive:
FILE.txtsame asfile.txt - Spaces in names: More common, use quotes
- Long path support: Enable for paths > 260 characters
WSL File System Integration
- Access Windows files from WSL:
/mnt/c/Users/username/ - Access WSL files from Windows:
\\wsl$\Ubuntu\home\username\ - File permissions: Different between Windows and WSL
- Line endings: Windows (
\r\n) vs Linux (\n)