0% found this document useful (0 votes)
16 views28 pages

Group 9 Group Assignment 2

The document provides an overview of basic Linux commands and their functionalities, including commands for navigating directories, managing files, and using text editors. Key commands discussed include 'pwd', 'ls', 'cd', 'mkdir', 'rm', 'mv', 'cp', and 'nano', along with their syntax and usage. The conclusion emphasizes the vast array of Linux commands available for users to explore and combine for efficient file management.

Uploaded by

iam.baltej1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views28 pages

Group 9 Group Assignment 2

The document provides an overview of basic Linux commands and their functionalities, including commands for navigating directories, managing files, and using text editors. Key commands discussed include 'pwd', 'ls', 'cd', 'mkdir', 'rm', 'mv', 'cp', and 'nano', along with their syntax and usage. The conclusion emphasizes the vast array of Linux commands available for users to explore and combine for efficient file management.

Uploaded by

iam.baltej1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 28

GROUP 9

TOPIC: LINUX COMMANDS


PRESENTED BY : ARPANDEEP SINGH (A00113304)
LOVEPREET SANDHU (A00126911)
HEMANT (A00111442)
SUMIT SINGH RANDHAWA (A00124837)
BALTEJ SINGH (A00127014)
Introduction to Linux
• Linux is an Operating System.

• Operating system is a software that manages all of the hardware resources


associated with your desktop or laptop. It manages the communication between
your software and your hardware.
• Linux is a freely distributable version of Unix, originally developed by Linus Torvalds
in 1991.
• Linux is free and open-source.
pwd

• This command shows us home directory (the current working


directory). It will print the full system path of the current working
directory to standard output.
ls , ls -l

• ls is a listing command, it is used to list all the folders and


directories in Linux. This command lists information about
directories and any type of files in the working directory, ls is
so essential owing to its features like it allows us to see what
files are in a directory.
• ls –l this command shows the files in long list format.
• It also shows the date , time and permissions.
ls -la

• This command also shows files in long listing format


including hidden files, hidden files start with a dot (.) .
ls –la | more

• Ls –la | more
• It is same as the previous command it has more option at the bottom.
We can go to the end by using space bar.
ll command

• ll is the other simple version of ls –la. It provides list long and including
all the files.
ls –la /etc

• The LS command is used to list all of the


folders and directories in a Linux system.
This command displays information about
directories and files of any kind in the
current working directory. It is very useful
since it allows us to see what files are in a
directory.
• ls –l this command shows the files in long
list format.
• “a” all files
• It also shows file inside “root etc” directory.
ls –la /etc |more

• “|” pipe one program into other program.


Sequences of program.
• In the command prompt, the “more”
command is used to view text files,
displaying one screen at a time if the file is
huge. Further can hit space bar or enter
button to see next page.
Ls –la /etc | less

• The 'less' command can also be used to


open a file for interactive reading,
including scrolling and searching
capabilities. If the file's content is too
enormous, it will paginate the output,
allowing you to navigate through it page
by page. It enables for both forward and
backward scrolling. You may scroll up and
down through a file in this way.
man ls

• Gives information that can reveal all


the arguments of ls command.
• We can also do it with other
commands to look up their
arguments.
• “man” stands for manual.
ls --help

• Other way to man ls command is ls –


help can scroll up and down of the
window to see all the arguments.

• ls –help |more to see arguments at


once in different screens.
cd command
• cd (change directory) command is used to change the current working
directory in Linux and other Unix-like operating systems.
• The syntax for the cd command is as follows:

cd [options] directory
• we can use both the relative and absolute path names with this command
• When we use cd without any argument, it will take us to our home directory.
cd ..

• This command is used to move the parent directory of current


directory, or the directory one level up from the current directory.
• “..” represents parent directory.
mkdir command

• This command is used to create directories in Linux (similar to creating


folders in operating system)
• Using this command, we can create multiple directories at once.
• The syntax for mkdir command is as follows:
• mkdir [options] [directories ……..]
touch command

• This command is used to create a file without any content. The file
created is empty.
• The syntax for touch command is as follows:
touch file_name
rm command

• rm command is used to remove objects such as files, directories.


• The syntax for rm command is as follows:
rm [option ] file_name
• When you remove the file using this command then you are not able to
recover that content, so be careful while running this command.
rm –r and rm –rf

• rm –r command delete all the files and sub-directories recursively of the parent
directory.
• rm with this option even delete he directories and its all content.
• rm –f command overrides the minor protection and removes the file forcefully
as rm prompts for confirmation removal if a file is write protected.
• rm with this option will not work for write-protect directories.
rmdir command

• rmdir command removes the directories from the filesystem but those
directories should be empty.
• The syntax for rmdir command is as follows:
rmdir [option] directories
mv command

• mv stands for move. This command is used to move one or more files or directories
from one place to another in a file system.
• This command has two distinct functions:

• Renames a file or folder


• Moves a group of files to a different directory
• The syntax for mv command is as follows:
mv [option] source destination
cp command

• cp stands for copy. This command is used to copy files or group of files.
• cp command require at least two filenames in its arguments.
• The syntax for cp command is as follows:
cp [option] source destination
cat command

• cat (concatenate) command is very frequently used in Linux.


• It is used to create the file and used to view the content of the files.
• The syntax of the cat command is different with respect to it’s uses:
For example:
• cat filename (it display the content inside the file)
• cat filename1 filenme2 (it will display the content of both the files)
• cat > filename (will create a file with text)
nano [filename]

• The very basic editor in the Linux is nano editor. This editor is used to
play with the data of any file.

To use nano editor to edit any file, we use command:


 nano[filename.txt]
file [____]

• This command is used to find the type of file.

• To know the type of any file ,use syntax:


 file document; here we are knowing about ‘documents’.
locate

• This command is used to simply locate any file, folder, or directory.


• By running this command we get the exact path of the file.
By using the syntax given below, we can know the location of the file.
 locate memo.txt
sudo updatedb

• This command is used to create or update a database. If the database


already exist, its data is reused to avoid rereading directories that have
not changed.
locate -i *[ ___ ]*

• This command is also used to locate any file or folder. The additional
feature of this locate command is that it ignores the case sensitivity.
• If we need to locate any file where we are unaware of the case used in
the file name, so, we can use syntax :
 locate -i *[ ___]*.
Conclusion

• As these are only basic Linux commands and there are other tons of
other commands and combinations, which we can explore to list out
files and directories based. One thing to remember is the ability to
combine multiple commands together at once.

You might also like