Linux File Mangement Flashcards
Which Linux command displays the current working directory?
pwd (print working directory) – The pwd command is used to display the name of the current working directory in the Linux system using the terminal.
Which Linux command displays a listing of all files and subdirectories in the current directory?
ls command - list files or directories in Linux and other Unix-based operating systems. Just like you navigate in your File explorer or Finder with a GUI, the ls command allows you to list all files or directories in the current directory by default, and further interact with them via the command line.
Which Linux command navigates between directories?
The cd (change directory) command moves you into a different directory. To move out of that directory, use cd along with the path to some other location, or use double dots to backtrack, or return home to navigate from there.
Which Linux commands copy and move data?
cp command
Which Linux command deletes data?
The rm command removes the entries for a specified file, group of files, or certain select files from a list within a directory. User confirmation, read permission, and write permission are not required before a file is removed when you use the rm command.
Which Linux command can you use to view the contents of files?
cat command
Which Linux command can you use to edit a text file?
vim command
Which Linux commands manage file and folder ownership and permissions?
chmod u represents permissions for the user owner, chmod g represents other users in the file’s group, chmod o represents other users not in the file’s group. For all users, use chmod a . Maybe you want to change the user owner itself. You can do that with the chown command.
man utility_name
A utility used at the shell prompt to view the syntax along with the options that can be used.
A system that organizes a computer’s files on a hard drive.
File system
One of the oldest Linux file systems.
Second Extended Filesystem (ext2)
The fourth-generation file system in the ext file system family.
Fourth Extended Filesystem (ext4)
Network File System (NFS)
A distributed file system used for file sharing on Unix and Linux.
A file system used for virtual memory.
swap
A FAT32 file system for Linux.
Virtual File Allocation Table (VFAT)
High performing and flexible file system.
Extended File System (XFS)
A Linux file system with copy-on-write functions. Sometimes referred to as butter FS or better FS.
B Tree File System (Btrfs)
Linux
open-source operating system
distribution
create your own custom version of Linux
popular Linux distributions
openSUSE, Fedora, and Ubuntu
where you can click on things with a mouse and make selections to bring up applications.
graphical interface
(known as shell) allows you to enter commands at the shell prompt to manage the system. The shell is often referred to as the bash (Bourne-again shell) shell
command line interface
most common shells names
csh, zsh, and bash
root user (linux)
superuser (linux)
saves commands entered at the shell prompt.
Command history
tries to guess a command you are entering and will complete the command for you if you press the TAB key.
command completion feature
Displays the path of the current directory on the screen.
pwd (print working directory)
Displays or changes IP configuration settings.
ip
Displays a list of files and subdirectories that exist within a directory.
ls
Displays a brief summary of how to use the command.
–help
Starts a new Bourne-again shell (bash) session.
bash
Displays the manual page for a command.
man
Displays more extensive documentation about the command.
info
Changes directories in the file system.
cd
Copies files and directories from one location in the file system to another.
cp
Moves and/or renames files and directories from one location or name to another.
mv
Deletes files and directories from the file system.
rm
Displays the contents of a text file on the screen.
cat
Displays the contents of a text file on the screen, pausing the output one screen at a time.
less
Displays the first few lines of a text file on the screen.
head
Displays the last few lines of a text file on the screen.
tail
Edits the contents of a text file. Current Linux systems use vim (an improved version of vi). Executing the vi command will launch the vim executable.
vi/vim
Allows you to switch user accounts.
su
Shuts down or reboots the system in a secure manner.
shutdown
-stores data in a standard directory and file hierarchy.
-supports a 2 TB maximum file size.
-can store up to 4 TB in size.
-File names can be 255 characters long.
-supports Linux users, groups, and permissions.
-does not use journaling (which is used in most modern file systems). As a result, recovery takes a long time if the system shuts down abruptly.
-oldest Linux file systems still available
Second Extended Filesystem (ext2)
-Before committing a transaction to a storage device, this system records the transaction to the journal and marks it as incomplete.
-After the disk transaction is complete, the file system marks the transaction as complete in the journal.
-Journaling allows this system to track of the most recent file transactions and indicates if they were completed.
-Journaling allows this system to recover much more quickly than ext2 in the event of an unclean system shutdown.
-updated version of ext2 that supports journaling
Third Extended Filesystem (ext3)
-Supports file sizes up to 16 TB and disk sizes up to 1 exabyte (EB).
-Allows for up to four billion files in the file system.
-Uses checksums to verify the integrity of the journal file.
-includes all features found with ext2 and ext3
Fourth Extended Filesystem (ext4)
used as virtual memory (the portion of the hard disk used to temporarily store portions of main memory) by the operating system.
swap
virtual Linux file system that provides access to individual data and audio tracks on compact discs (CDs). A compact disc mounted with the CDfs driver appears as a collection of files, each representing a single track.
Compact Disc File System (CDfs)
distributed file system protocol that allows a user on a client computer to access files over a computer network much like local storage is accessed.
Network File System (NFS)
-FAT32 file system for Linux
-Does not support journaling.
-Includes long name support.
-Requires support for VFAT to be compiled into the kernel for the system to recognize the VFAT format.
Virtual File Allocation Table (VFAT)
-developed for the Silicon Graphics IRIX operating system
-Offers smooth data transfers.
-Provides journaling.
-Can reside on a regular disk partition or on a logical volume.
Extended File System (XFS)
-Linux file system that uses a copy-on-write file system.
-Using copy-on-write technology, this system provides several key features not found in earlier file systems: storage pools and snapshots
B Tree File System (Btrfs)
Btrfs allows you to create storage pools from the storage devices in the system.
From the storage pool, you can allocate space to specific storage volumes.
You mount storage volumes at mount points in the file system.
Storage pools
the snapshot functionality provided by Btrfs protects data.
You can configure it to take snapshots of data at specified intervals and save it on separate media.
If a file gets lost or corrupted, you can restore a previous version of the file from a snapshot.
snapshots
Changes the user or group that owns a file or directory.
chown
Changes the group that owns a file or directory.
chgrp
Copies file system data using records. It can copy files, directories, partitions, or even entire hard disks.
dd
-opens a Bourne-Again Shell (Bash) session.
-standard shell used in most Linux computers.
-uses commands similar to a UNIX shell and includes: Command completion, Command history, and Improved arithmetic functions
bash
displays the IP addresses and subnet masks that are assigned to each network interface on a Linux system.
ip or ifconfig
displays the manual page for the cat command. This command is very similar to the help screen, but provides more detail.
man cat
instructs the system to shut down and power down.
shutdown -h
specifies when to perform the shutdown operation. m is the amount of time (specified in minutes).
shutdown +m