Command hub

File Management commands

Core file and directory operations for users moving from CMD or PowerShell to Linux shells.

Archives & CompressionAttributesCompareCopy/MoveDeletionDirectory ListingFile SystemLinksPathsPermissionsPowerShell File Cmdlets

Distro notes

Debian/Ubuntu vs Fedora vs Arch

File Management

Debian/Ubuntu apt sudo apt install tree rsync zip unzip p7zip-full acl

Most core file tools come from GNU coreutils and are installed by default.

Fedora dnf sudo dnf install tree rsync zip unzip p7zip acl

Core commands are the same; optional tools use dnf package names.

Arch pacman sudo pacman -S tree rsync zip unzip p7zip acl

Minimal installs may lack convenience tools until you install them.

Guides

All File Management command guides

76 commands

7z a7z a archive.7z folder/ Archives & Compression Create a 7-Zip archive Creates 7z, ZIP and other supported archive formats with the 7-Zip command-line tool. Distro equivalents Debian/Ubuntu 7z a archive.7z folder/ Fedora 7z a archive.7z folder/ Arch 7z a archive.7z folder/ Open full guide → 7z x7z x archive.7z Archives & Compression Extract a 7-Zip archive Extracts 7z, ZIP, RAR and many other archive formats while preserving directory paths. Distro equivalents Debian/Ubuntu 7z x archive.7z Fedora 7z x archive.7z Arch 7z x archive.7z Open full guide → Compress-Archivezip -r archive.zip folder/ Archives & Compression Create a ZIP archive Compresses files or folders into a standard ZIP archive. Distro equivalents Debian/Ubuntu zip -r archive.zip folder/ Fedora zip -r archive.zip folder/ Arch zip -r archive.zip folder/ Open full guide → Expand-Archiveunzip archive.zip Archives & Compression Extract a ZIP archive Extracts files from a ZIP archive into the current directory or a chosen destination. Distro equivalents Debian/Ubuntu unzip archive.zip Fedora unzip archive.zip Arch unzip archive.zip Open full guide → compact /cgzip file.log Archives & Compression Compress individual files Compresses individual files using gzip or xz to reduce their stored size. Distro equivalents Debian/Ubuntu gzip file.log Fedora gzip file.log Arch gzip file.log Open full guide → compact /ugunzip file.log.gz Archives & Compression Decompress individual files Restores files previously compressed with gzip or xz. Distro equivalents Debian/Ubuntu gunzip file.log.gz Fedora gunzip file.log.gz Arch gunzip file.log.gz Open full guide → expand cabinet filecabextract file.cab Archives & Compression Extract CAB archive Extracts Microsoft cabinet archives on Linux. Distro equivalents Debian/Ubuntu cabextract file.cab Fedora cabextract file.cab Arch cabextract file.cab Open full guide → gzip filegzip -k file Archives & Compression Compress with gzip Creates a .gz file while optionally keeping the original. Distro equivalents Debian/Ubuntu gzip -k file Fedora gzip -k file Arch gzip -k file Open full guide → tar.exe -cftar -cf archive.tar folder/ Archives & Compression Create a TAR archive Combines files and directories into a TAR archive without necessarily compressing them. Distro equivalents Debian/Ubuntu tar -cf archive.tar folder/ Fedora tar -cf archive.tar folder/ Arch tar -cf archive.tar folder/ Open full guide → tar.exe -tftar -tf archive.tar Archives & Compression List tar archive contents Lists files inside a tar archive without extracting it. Distro equivalents Debian/Ubuntu tar -tf archive.tar Fedora tar -tf archive.tar Arch tar -tf archive.tar Open full guide → tar.exe -xftar -xf archive.tar Archives & Compression Extract a TAR archive Extracts TAR, tar.gz, tar.xz and other tar-based archives. Distro equivalents Debian/Ubuntu tar -xf archive.tar Fedora tar -xf archive.tar Arch tar -xf archive.tar Open full guide → unzip -l on Windowsunzip -l archive.zip Archives & Compression List zip archive contents Lists files in a zip without extracting them. Distro equivalents Debian/Ubuntu unzip -l archive.zip Fedora unzip -l archive.zip Arch unzip -l archive.zip Open full guide → xz filexz -T0 file Archives & Compression Compress with xz Creates a high-compression .xz file using available CPU threads. Distro equivalents Debian/Ubuntu xz -T0 file Fedora xz -T0 file Arch xz -T0 file Open full guide → zip recursive folderzip -r archive.zip folder Archives & Compression Create recursive zip Compresses a folder tree into a zip file. Distro equivalents Debian/Ubuntu zip -r archive.zip folder Fedora zip -r archive.zip folder Arch zip -r archive.zip folder Open full guide → attrib +hmv file .file Attributes Hide a file Linux hides files by naming them with a leading dot. Distro equivalents Debian/Ubuntu mv file .file Fedora mv file .file Arch mv file .file Open full guide → compcmp file1 file2 Compare Compare binary files Compares files byte-for-byte and reports the first difference. Distro equivalents Debian/Ubuntu cmp file1 file2 Fedora cmp file1 file2 Arch cmp file1 file2 Open full guide → fc /bcmp file1 file2 Compare Binary file compare Compares two files as binary data. Distro equivalents Debian/Ubuntu cmp file1 file2 Fedora cmp file1 file2 Arch cmp file1 file2 Open full guide → copy /ycp -f source destination Copy/Move Copy and overwrite Copies while forcing overwrite of the target. Distro equivalents Debian/Ubuntu cp -f source destination Fedora cp -f source destination Arch cp -f source destination Open full guide → move /ymv -f source destination Copy/Move Move and overwrite Moves while forcing overwrite of the target. Distro equivalents Debian/Ubuntu mv -f source destination Fedora mv -f source destination Arch mv -f source destination Open full guide → robocopy /ersync -a source/ destination/ Copy/Move Robust recursive copy Mirrors a directory tree without deleting extra target files. Distro equivalents Debian/Ubuntu rsync -a source/ destination/ Fedora rsync -a source/ destination/ Arch rsync -a source/ destination/ Open full guide → robocopy /mirrsync -a --delete source/ destination/ Copy/Move Mirror directories Synchronizes a destination so it matches the source. Distro equivalents Debian/Ubuntu rsync -a --delete source/ destination/ Fedora rsync -a --delete source/ destination/ Arch rsync -a --delete source/ destination/ Open full guide → robocopy /xorsync -au source/ destination/ Copy/Move Skip older source files Copies only files that are newer than existing destination files. Distro equivalents Debian/Ubuntu rsync -au source/ destination/ Fedora rsync -au source/ destination/ Arch rsync -au source/ destination/ Open full guide → robocopy /zrsync -a --partial --progress source/ destination/ Copy/Move Resume interrupted copy Keeps partial transfers and shows transfer progress. Distro equivalents Debian/Ubuntu rsync -a --partial --progress source/ destination/ Fedora rsync -a --partial --progress source/ destination/ Arch rsync -a --partial --progress source/ destination/ Open full guide → xcopy /drsync -au source/ destination/ Copy/Move Copy only newer files Copies files only when the source is newer than the target. Distro equivalents Debian/Ubuntu rsync -au source/ destination/ Fedora rsync -au source/ destination/ Arch rsync -au source/ destination/ Open full guide → xcopy /ecp -a source_dir destination_dir Copy/Move Copy directory tree Copies folders recursively while preserving common metadata. Distro equivalents Debian/Ubuntu cp -a source_dir destination_dir Fedora cp -a source_dir destination_dir Arch cp -a source_dir destination_dir Open full guide → del /qrm -f file Deletion Delete without prompting Removes a file without interactive confirmation. Distro equivalents Debian/Ubuntu rm -f file Fedora rm -f file Arch rm -f file Open full guide → del /sfind . -name "PATTERN" -type f -delete Deletion Delete recursively by pattern Finds matching files under a tree and deletes them. Distro equivalents Debian/Ubuntu find . -name "PATTERN" -type f -delete Fedora find . -name "PATTERN" -type f -delete Arch find . -name "PATTERN" -type f -delete Open full guide → sdelete fileshred -u file Deletion Secure-delete a file Overwrites and removes a file when secure deletion is appropriate. Distro equivalents Debian/Ubuntu shred -u file Fedora shred -u file Arch shred -u file Open full guide → dir /als -la Directory Listing Show all files Lists hidden and non-hidden files. Distro equivalents Debian/Ubuntu ls -la Fedora ls -la Arch ls -la Open full guide → dir /o:nls | sort Directory Listing Sort directory listing by name Sorts file names alphabetically. Distro equivalents Debian/Ubuntu ls | sort Fedora ls | sort Arch ls | sort Open full guide → dir /o:sls -lS Directory Listing Sort directory listing by size Shows large files first. Distro equivalents Debian/Ubuntu ls -lS Fedora ls -lS Arch ls -lS Open full guide → dir /qls -l Directory Listing Show file owner Displays owner and group in a long listing. Distro equivalents Debian/Ubuntu ls -l Fedora ls -l Arch ls -l Open full guide → assoc / ftype (file extension to program)xdg-mime File System Manage file type associations Views or changes which application opens files of a particular type. Distro equivalents Debian/Ubuntu xdg-mime Fedora xdg-mime Arch xdg-mime Open full guide → cdcd File System Change directory Navigates between directories. Same command name, but with important differences in path notation. Distro equivalents Debian/Ubuntu cd Fedora cd Arch cd Open full guide → copycp File System Copy files and folders Copies files or entire directory trees to another location. Distro equivalents Debian/Ubuntu cp Fedora cp Arch cp Open full guide → copy concat > filename File System Create a file from keyboard input Lets you type content directly into a new file from the terminal, without opening an editor. Distro equivalents Debian/Ubuntu cat > filename Fedora cat > filename Arch cat > filename Open full guide → del / eraserm File System Delete files and folders Removes files or directories. Be very careful — Linux has no Recycle Bin by default. Distro equivalents Debian/Ubuntu rm Fedora rm Arch rm Open full guide → dirls -la File System List directory contents Lists files and folders in the current (or specified) directory. Distro equivalents Debian/Ubuntu ls -la Fedora ls -la Arch ls -la Open full guide → dir /bls -1 File System List names only Prints one file or directory name per line without detailed metadata. Distro equivalents Debian/Ubuntu ls -1 Fedora ls -1 Arch ls -1 Open full guide → fsutil file createnewtruncate -s 100M test.img File System Create a file of a chosen size Creates an empty or preallocated file with a specific size. Distro equivalents Debian/Ubuntu truncate -s 100M test.img Fedora truncate -s 100M test.img Arch truncate -s 100M test.img Open full guide → mkdirmkdir File System Create new directories Creates one or more new directories. Same name, but with a useful extra flag. Distro equivalents Debian/Ubuntu mkdir Fedora mkdir Arch mkdir Open full guide → mklinkln -s File System Create symbolic and hard links Creates symbolic links (shortcuts) or hard links pointing to files or directories. Distro equivalents Debian/Ubuntu ln -s Fedora ln -s Arch ln -s Open full guide → moreless File System Page through large files Displays large text files one screen at a time, allowing you to scroll up and down. Distro equivalents Debian/Ubuntu less Fedora less Arch less Open full guide → movemv File System Move or rename files Moves files to a new location, or renames them. In Linux, renaming IS moving. Distro equivalents Debian/Ubuntu mv Fedora mv Arch mv Open full guide → pushd / popdpushd / popd File System Save and restore directory location Saves your current directory to a stack so you can jump back to it later after navigating elsewhere. Distro equivalents Debian/Ubuntu pushd / popd Fedora pushd / popd Arch pushd / popd Open full guide → rd / rmdirrmdir / rm -r File System Remove directories Deletes empty directories (rmdir) or directories with all their contents (rm -r). Distro equivalents Debian/Ubuntu rmdir / rm -r Fedora rmdir / rm -r Arch rmdir / rm -r Open full guide → ren / renamemv / rename File System Rename files Renames a file or batch-renames multiple files matching a pattern. Distro equivalents Debian/Ubuntu mv / rename Fedora mv / rename Arch mv / rename Open full guide → robocopyrsync -avh source/ destination/ File System Synchronize directory trees Copies and synchronizes directories efficiently, transferring only changed content when possible. Distro equivalents Debian/Ubuntu rsync -avh source/ destination/ Fedora rsync -avh source/ destination/ Arch rsync -avh source/ destination/ Open full guide → substsudo mount --bind /source /mountpoint File System Map a directory to another path Makes an existing directory tree accessible at a second mount point. Distro equivalents Debian/Ubuntu sudo mount --bind /source /mountpoint Fedora sudo mount --bind /source /mountpoint Arch sudo mount --bind /source /mountpoint Open full guide → treetree File System Display directory tree Shows the directory structure as a visual tree. May need to be installed on Linux. Distro equivalents Debian/Ubuntu tree Fedora tree Arch tree Open full guide → typecat File System Display file contents Shows the contents of a text file in the terminal. Also used to combine files. Distro equivalents Debian/Ubuntu cat Fedora cat Arch cat Open full guide → xcopyrsync -av File System Advanced copy with sync & progress Copies directories with more control than cp — supports sync, progress display, resume, and remote copying. Distro equivalents Debian/Ubuntu rsync -av Fedora rsync -av Arch rsync -av Open full guide → fsutil hardlink createln existing_file hardlink_name Links Create hard link Creates another directory entry pointing to the same file inode. Distro equivalents Debian/Ubuntu ln existing_file hardlink_name Fedora ln existing_file hardlink_name Arch ln existing_file hardlink_name Open full guide → mklink /Dln -s target link_name Links Create directory symlink Creates a symbolic link to a directory. Distro equivalents Debian/Ubuntu ln -s target link_name Fedora ln -s target link_name Arch ln -s target link_name Open full guide → mklink /Hln target hardlink_name Links Create file hard link Creates a Linux hard link for a regular file. Distro equivalents Debian/Ubuntu ln target hardlink_name Fedora ln target hardlink_name Arch ln target hardlink_name Open full guide → mklink /Jmount --bind /real/path /mount/path Links Create junction-like bind mount Uses a bind mount for a directory-to-directory mapping. Distro equivalents Debian/Ubuntu mount --bind /real/path /mount/path Fedora mount --bind /real/path /mount/path Arch mount --bind /real/path /mount/path Open full guide → PowerShell Join-Pathprintf "%s/%s\n" "$dir" "$name" Paths Join path components Combines directory and filename strings in shell scripts. Distro equivalents Debian/Ubuntu printf "%s/%s\n" "$dir" "$name" Fedora printf "%s/%s\n" "$dir" "$name" Arch printf "%s/%s\n" "$dir" "$name" Open full guide → PowerShell Split-Pathdirname /path/to/file Paths Return parent path Prints the directory portion of a path. Distro equivalents Debian/Ubuntu dirname /path/to/file Fedora dirname /path/to/file Arch dirname /path/to/file Open full guide → PowerShell Split-Path -Leafbasename /path/to/file Paths Return filename from path Prints the final component of a path. Distro equivalents Debian/Ubuntu basename /path/to/file Fedora basename /path/to/file Arch basename /path/to/file Open full guide → cd with current pathpwd Paths Print current directory Shows the current working directory, similar to checking the current folder in CMD. Distro equivalents Debian/Ubuntu pwd Fedora pwd Arch pwd Open full guide → PowerShell Get-Aclgetfacl file Permissions Show ACL permissions Displays POSIX ACLs where ACL support is enabled. Distro equivalents Debian/Ubuntu getfacl file Fedora getfacl file Arch getfacl file Open full guide → PowerShell Set-Aclsetfacl -m u:USER:rw file Permissions Set ACL permissions Modifies POSIX ACL entries for users or groups. Distro equivalents Debian/Ubuntu setfacl -m u:USER:rw file Fedora setfacl -m u:USER:rw file Arch setfacl -m u:USER:rw file Open full guide → icacls /grantsetfacl -m u:USER:rwx file Permissions Grant ACL permissions Grants explicit permissions to a user. Distro equivalents Debian/Ubuntu setfacl -m u:USER:rwx file Fedora setfacl -m u:USER:rwx file Arch setfacl -m u:USER:rwx file Open full guide → icacls /resetsetfacl -b file Permissions Reset ACL entries Removes extended ACL entries from a file. Distro equivalents Debian/Ubuntu setfacl -b file Fedora setfacl -b file Arch setfacl -b file Open full guide → icacls filegetfacl file Permissions View file ACLs Shows detailed access-control entries. Distro equivalents Debian/Ubuntu getfacl file Fedora getfacl file Arch getfacl file Open full guide → takeown /rsudo chown -R USER:GROUP path Permissions Take ownership recursively Changes owner and group recursively. Distro equivalents Debian/Ubuntu sudo chown -R USER:GROUP path Fedora sudo chown -R USER:GROUP path Arch sudo chown -R USER:GROUP path Open full guide → PowerShell Copy-Itemcp source destination PowerShell File Cmdlets Copy a file Copies files from one path to another. Distro equivalents Debian/Ubuntu cp source destination Fedora cp source destination Arch cp source destination Open full guide → PowerShell Copy-Item -Recursecp -r source_dir destination_dir PowerShell File Cmdlets Copy folders recursively Copies a directory and its contents. Distro equivalents Debian/Ubuntu cp -r source_dir destination_dir Fedora cp -r source_dir destination_dir Arch cp -r source_dir destination_dir Open full guide → PowerShell Get-ChildItem -Forcels -la PowerShell File Cmdlets List files including hidden files Shows normal and hidden dotfiles with detailed metadata. Distro equivalents Debian/Ubuntu ls -la Fedora ls -la Arch ls -la Open full guide → PowerShell Get-ChildItem -Recursefind . PowerShell File Cmdlets Recursively list files Walks a directory tree and prints matching files and folders. Distro equivalents Debian/Ubuntu find . Fedora find . Arch find . Open full guide → PowerShell Get-Locationpwd PowerShell File Cmdlets Show current directory Prints the absolute path of the current working directory. Distro equivalents Debian/Ubuntu pwd Fedora pwd Arch pwd Open full guide → PowerShell Move-Itemmv source destination PowerShell File Cmdlets Move files or folders Moves or renames paths. Distro equivalents Debian/Ubuntu mv source destination Fedora mv source destination Arch mv source destination Open full guide → PowerShell Remove-Itemrm file PowerShell File Cmdlets Remove a file Deletes a file from the filesystem. Distro equivalents Debian/Ubuntu rm file Fedora rm file Arch rm file Open full guide → PowerShell Remove-Item -Recurse -Forcerm -rf directory PowerShell File Cmdlets Force-remove a folder tree Deletes a directory tree without prompting. Distro equivalents Debian/Ubuntu rm -rf directory Fedora rm -rf directory Arch rm -rf directory Open full guide → PowerShell Rename-Itemmv old_name new_name PowerShell File Cmdlets Rename a file Renames a file or directory. Distro equivalents Debian/Ubuntu mv old_name new_name Fedora mv old_name new_name Arch mv old_name new_name Open full guide → PowerShell Set-Locationcd /path/to/folder PowerShell File Cmdlets Change directory Moves the shell into another directory. Distro equivalents Debian/Ubuntu cd /path/to/folder Fedora cd /path/to/folder Arch cd /path/to/folder Open full guide →