Micro - Project - Linux Milan Pratik Prasen
Micro - Project - Linux Milan Pratik Prasen
On
FILE MANAGEMENT
By
SUTHAR PRASEN R (236040316094) , THAKOR MILAN
(236040316097) , VANKAR PRATIK
(236040316101)Enrollment No: 236040316094 , 236040316097 ,
236040316101
Date:22/10/24
Place: B&B INSTITUE OF TECHNOLOGY , VV NAGAR
ANNAD
1. Introduction
1.1 File Management in Linux
1.2 File listing
1.2.1 Creating files
1.2.2 Displaying file contents
1.3 ...
2. Softwares for [ linux terminal ]
2.1 Moving a File
2.2 renaming a file
2.3 deleting a file
1. Introduction
In Linux, most of the operations are performed on files. And to handle these
files Linux has directories also known as folders which are maintained in a
tree-like structure. Though, these directories are also a type of file
themselves. Linux has 3 types of files:
1. Regular Files: It is the common file type in Linux. it includes files like –
text files, images, binary files, etc. Such files can be created using the
touch command. They consist of the majority of files in the Linux/UNIX
system. The regular file contains ASCII or Human Readable text,
executable program binaries, program data and much more.
2. Directories: Windows call these directories as folders. These are the
files that store the list of file names and the related information. The root
directory(/) is the base of the system, /home/ is the default location for
user’s home directories, /bin for Essential User Binaries, /boot – Static
Boot Files, etc. We could create new directories with mkdir command.
3. Special Files: Represents a real physical device such as a printer which
is used for IO operations. Device or special files are used for device
Input/Output(I/O) on UNIX and Linux systems. You can see them in a
file system like an ordinary directory or file.
In Unix systems, there are two types of special files for each device, i.e.
character special files and block special files. For more details, read the
article Unix file system.
It returns the detailed listing of the files and directories in the current
directory. The command gives os the owner of the file and even which file
could be managed by which user or group and which user/group has the
right to access or execute which file.
touch command can be used to create a new file. It will create and open a
new blank file if the file with a filename does not exist. And in case the file
already exists then the file will not be affected.
$touch filename
1.3 Displaying File Contents
cat command can be used to display the contents of a file. This command
will display the contents of the ‘filename’ file. And if the output is very
large then we could use more or less to fit the output on the terminal screen
otherwise the content of the whole file is displayed at once.
$cat filename
cp command could be used to create the copy of a file. It will create the new
file in destination with the same name and content as that of the file
‘filename’.
$cp source/filename destination/
rm command could be used to delete a file. It will remove the filename file
from the directory.
$rm filename
Unlock the power of Linux with our Online Linux Course with
Certification! Whether a beginner or an experienced professional, this
course is designed to help you master Linux, the backbone of modern
computing. Dive into comprehensive modules covering everything
from basic commands to advanced system administration. With hands-
on projects and real-world examples, you'll gain the skills to manage
Linux environments efficiently and confidently. Plus, earn a certification
that showcases your expertise to potential employers.
Ready to become a Linux pro? Enroll now and take your tech career to the
next level!
File management in Linux revolves around organizing, accessing, and
manipulating files and directories using various command-line tools
and utilities. Here's a summary of key concepts and commands:
- **Special directories**:
- `ls -l`: Long format with file details (permissions, ownership, etc.).
- `head <file>`: View the first few lines of a file (default is 10 lines).
- `chmod 755 <file>`: Set read, write, execute for the owner; read,
execute for group and others.
- **Use plain text for data**: Text files are preferred as a universal
format for input, output, and configuration.
- The source code is open and available for anyone to view, modify,
and distribute.
- **Core utilities**: Tools for file management (e.g., `cp`, `ls`, `rm`),
text processing (e.g., `grep`, `sed`), and system monitoring (e.g., `top`,
`ps`).
### 7. **Modularity**
### 8. **Distributions**
[3] https://www.jaroeducation.com/blog/10-standard-linux-commands-for-file-
management/