cat Utility to concatenate files to standard output
chgrp Utility to change file group ownership
chmod Utility to change file access permissions
chown Utility to change file owner and group
cp Utility to copy files and directories
date Utility to print or set the system data and time
dd Utility to convert and copy a file
df Utility to report filesystem disk space usage
dmesg Utility to print or control the kernel message buffer
echo Utility to display a line of text
false Utility to do nothing, unsuccessfully
hostname Utility to show or set the system’s host name
kill Utility to send signals to processes
ln Utility to make links between files
login Utility to begin a session on the system
ls Utility to list directory contents
mkdir Utility to make directories
mknod Utility to make block or character special files
more Utility to page through text
mount Utility to mount a filesystem
mv Utility to move/rename files
ps Utility to report process status
pwd Utility to print name of current working directory
rm Utility to remove files or directories
rmdir Utility to remove empty directories
sed The ‘sed’ stream editor
sh The Bourne command shell
stty Utility to change and print terminal line settings
su Utility to change user ID
sync Utility to flush filesystem buffers
true Utility to do nothing, successfully
umount Utility to unmount file systems
uname Utility to print system information
Listing Files
ls -a
ls -l
ls -l -h
ls -d
cp [source] [destination]
cp /tmp -r
mv [source] [destination]
mv newexample.txt myfile.txt
-i Interactive: Ask if a file is to be overwritten.
-n Do not overwrite a destination file's contents.
-v Verbose: Show the resulting move.
Loo uus tühi fail:
Kustuta faile ja kaustu:
rm -i option when deleting multiple files
rm -i *.txt
rm -r Videos
rmdir, but only if the directory is empty
mkdir
Aliases
alias mycal="cal 2019"
mycal
echo Today is `date`
Today is Wed Nov 17 21:03:18 UTC 2021
semicolon ; character can be used to run multiple commands
cal 1 2030; cal 2 2030; cal 3 2030
double ampersand && acts as a logical "and";
ls /etc/ppp && echo success
double pipe || is a logical "or"
ls /etc/junk || echo failed
Running a script
#!/bin/sh
echo "Hello, World!"
chmod +x ./test.sh -käivitavaks muutmiseks
sh test.sh
./test.sh
Process Snapshot
ps aux | head
ps -e | grep firefox
ps -u root
Directory Description
/ The base of the structure, or root of the filesystem, this directory unifies all directories regardless of whether they are local partitions, removable devices or network shares
/bin Essential binaries like the ls, cp, and rm commands, and be a part of the root filesystem
/boot Files necessary to boot the system, such as the Linux kernel and associated configuration files
/dev Files that represent hardware devices and other special files, such as the /dev/null and /dev/zero files
/etc Essential host configurations files such as the
/etc / hosts or /etc / passwd files
/home User home directories
/lib Essential libraries to support the executable files in the /bin and /sbin directories
/lib64 Essential libraries built for a specific architecture. For example, the /lib64 directory for 64-bit AMD/Intel x86 compatible processors
/media Mount point for removable media mounted automatically
/mnt Mount point for temporarily mounting filesystems manually
/opt Optional third-party software installation location
/proc Virtual filesystem for the kernel to report process information, as well as other information
/root Home directory of the root user
/sbin Essential system binaries primarily used by the root user
/sys Virtual filesystem for information about hardware devices connected to the system
/srv Location where site-specific services may be hosted
/tmp Directory where all users are allowed to create temporary files and that is supposed to be cleared at boot time (but often is not)
/usr Second hierarchy Non-essential files for multi-user use
/usr/local Third hierarchy Files for software not originating from distribution
/var Fourth hierarchy Files that change over time
/var/cache Files used for caching application data
/var/log Most log files
/var/lock Lock files for shared resources
/var/spool Spool files for printing and mail
/var/tmp Temporary files to be preserved between reboots
***POOLELI
chgrp Utility to change file group ownership
chmod Utility to change file access permissions
chown Utility to change file owner and group
cp Utility to copy files and directories
date Utility to print or set the system data and time
dd Utility to convert and copy a file
df Utility to report filesystem disk space usage
dmesg Utility to print or control the kernel message buffer
echo Utility to display a line of text
false Utility to do nothing, unsuccessfully
hostname Utility to show or set the system’s host name
kill Utility to send signals to processes
ln Utility to make links between files
login Utility to begin a session on the system
ls Utility to list directory contents
mkdir Utility to make directories
mknod Utility to make block or character special files
more Utility to page through text
mount Utility to mount a filesystem
mv Utility to move/rename files
ps Utility to report process status
pwd Utility to print name of current working directory
rm Utility to remove files or directories
rmdir Utility to remove empty directories
sed The ‘sed’ stream editor
sh The Bourne command shell
stty Utility to change and print terminal line settings
su Utility to change user ID
sync Utility to flush filesystem buffers
true Utility to do nothing, successfully
umount Utility to unmount file systems
uname Utility to print system information
Listing Files
ls -a
ls -l
ls -l -h
ls -d
cp [source] [destination]
cp /tmp -r
mv [source] [destination]
mv newexample.txt myfile.txt
-i Interactive: Ask if a file is to be overwritten.
-n Do not overwrite a destination file's contents.
-v Verbose: Show the resulting move.
Loo uus tühi fail:
Kood:
touch sample
rm -i option when deleting multiple files
rm -i *.txt
rm -r Videos
rmdir, but only if the directory is empty
mkdir
Aliases
alias mycal="cal 2019"
mycal
echo Today is `date`
Today is Wed Nov 17 21:03:18 UTC 2021
semicolon ; character can be used to run multiple commands
cal 1 2030; cal 2 2030; cal 3 2030
double ampersand && acts as a logical "and";
ls /etc/ppp && echo success
double pipe || is a logical "or"
ls /etc/junk || echo failed
Running a script
#!/bin/sh
echo "Hello, World!"
chmod +x ./test.sh -käivitavaks muutmiseks
sh test.sh
./test.sh
Process Snapshot
ps aux | head
ps -e | grep firefox
ps -u root
Directory Description
/ The base of the structure, or root of the filesystem, this directory unifies all directories regardless of whether they are local partitions, removable devices or network shares
/bin Essential binaries like the ls, cp, and rm commands, and be a part of the root filesystem
/boot Files necessary to boot the system, such as the Linux kernel and associated configuration files
/dev Files that represent hardware devices and other special files, such as the /dev/null and /dev/zero files
/etc Essential host configurations files such as the
/etc / hosts or /etc / passwd files
/home User home directories
/lib Essential libraries to support the executable files in the /bin and /sbin directories
/lib64 Essential libraries built for a specific architecture. For example, the /lib64 directory for 64-bit AMD/Intel x86 compatible processors
/media Mount point for removable media mounted automatically
/mnt Mount point for temporarily mounting filesystems manually
/opt Optional third-party software installation location
/proc Virtual filesystem for the kernel to report process information, as well as other information
/root Home directory of the root user
/sbin Essential system binaries primarily used by the root user
/sys Virtual filesystem for information about hardware devices connected to the system
/srv Location where site-specific services may be hosted
/tmp Directory where all users are allowed to create temporary files and that is supposed to be cleared at boot time (but often is not)
/usr Second hierarchy Non-essential files for multi-user use
/usr/local Third hierarchy Files for software not originating from distribution
/var Fourth hierarchy Files that change over time
/var/cache Files used for caching application data
/var/log Most log files
/var/lock Lock files for shared resources
/var/spool Spool files for printing and mail
/var/tmp Temporary files to be preserved between reboots
***POOLELI