Unix Programing
Unix Programing
mv file1.txt
Moves files or directories.
mv Documents/
cp file1.txt
Copies files or directories.
cp file2.txt
mv file1.txt
Moves files or directories.
mv Documents
killall -9
killall Terminates processes by name. firefox
sed
Processes and transforms 's/old_string/new_string/g'
sed text streams. file.txt
Special Files
Used to represent a real physical device such as a printer, tape drive
or terminal, used for Input/Output (I/O) operations. Device or special
files are used for device Input/Output(I/O) on UNIX and Linux
systems. They appear in a file system just like an ordinary file or a
directory. On UNIX systems there are two flavors of special files for
each device, character special files and block special files :
Pipes
UNIX allows you to link commands together using a pipe. The pipe
acts a temporary file which only exists to hold data from one
command until it is read by another.A Unix pipe provides a one-way
flow of data.The output or result of the first command sequence is
used as the input to the second command sequence. To make a pipe,
put a vertical bar (|) on the command line between two
commands.For example: who | wc -l In long-format output of ls –l ,
named pipes are marked by the “p” symbol.
Symbolic Link
Symbolic link is used for referencing some other file of the file
system.Symbolic link is also known as Soft link. It contains a text form
of the path to the file it references. To an end user, symbolic link will
appear to have its own name, but when you try reading or writing data
to this file, it will instead reference these operations to the file it points
to. If we delete the soft link itself , the data file would still be there.If we
delete the source file or move it to a different location, symbolic file will
not function properly. In long-format output of ls –l , Symbolic link are
marked by the “l” symbol (that’s a lower case L).
Advantages of the Unix file System
Hierarchical organization: The hierarchical structure of the Unix file
system makes it easy to organize and navigate files and directories.
Robustness: The Unix file system is known for its stability and
reliability. It can handle large amounts of data without becoming
unstable or crashing.
Security: The Unix file system uses a set of permissions that allows
administrators to control who has access to files and directories.
Compatibility: The Unix file system is widely used and supported,
which means that files can be easily transferred between different
Unix-based systems.
Disadvantages of the Unix file System
Complexity: The Unix file system can be complex to understand and
manage, especially for users who are not familiar with the command
line interface.
Steep Learning Curve: Users who are not familiar with Unix-based
systems may find it difficult to learn how to use the Unix file system.
Lack of User-Friendly Interface: The Unix file system is primarily
managed through the command line interface, which may not be as
user-friendly as a graphical user interface.
Limited Support for Certain File Systems: While the Unix file system
is compatible with many file systems, there are some file systems
that are not fully supported