0% found this document useful (0 votes)
24 views

Linux Command

The document provides information about common Linux commands like cd, pwd, ls, cat, mkdir, rmdir, rm, cp, and chmod. It describes what each command is used for and provides examples of basic syntax and usage.

Uploaded by

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

Linux Command

The document provides information about common Linux commands like cd, pwd, ls, cat, mkdir, rmdir, rm, cp, and chmod. It describes what each command is used for and provides examples of basic syntax and usage.

Uploaded by

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

$ = normal user

# = Root user
cd= change directory
~ = home directory
.. back
clear = clearscreen

Commanad

pwd= current directory


cd 'direcotory name'
cd / = root directory
cs ~ = home direcotry
cd = home directory
cd .. = back
ls =list of folders
ls / =root directory ja ja ache dekhabe
ls ~=home directory te ja ja ache
ls .. = back e giye listing
ls ../..
ls -l = details informations jana jabe.
drwxr-xr-x 2 user group 4096(size) modified-date&time 'folder name'
d=directory
-=file
1st 3=user , bit 2nd 3 bit= group, 3rd 3 bit= other users
r=read,w=write,x=execution
ls -a=for hidden file and folder
touch hello.txt file create with.txt
touch hello.html file create with.html
ls *.txt = all .txt file shows
ls -ls>out.txt
ls -d */ = only subdirectory
ls -ld */ = info of all directory
ls -lh = file size in human readable format
ls -lt = time wise sort
ls -ltr =reverse order e sorting

cat(concatenate) command
file open na kore read korar and file create korar jnno jnno use hoi cat command

cat [option] 'filenames' //format


cat >hello.txt //create txt file and write something then press ctrl+d
cat hello.txt // read existing file

cat hello.txt hello1.txt // multiple file reading

cat hello.txt | more //beshi contact thakle

cat -n hello.txt //content with line number

cat hello.txt>file.txt // copy from hello.txt to file.txt with overlap

cat hello.txt>>file.txt // copy from hello.txt to file.txt without


overlaping(appending)

cat hello.txt hello1.txt file.txt>test.txt

cat hello.*
cat text1.txt | sort | uniq // duplicate remover

mkdir command

mkdir [option] directories

mkdir pics
mkdir dir1 dir2 dir3
mkdir dir3/dir4 // inside dir 3 new dir created
mkdir -p dir5/dir6 // dir create kore then inside arekta dir create korbe
mkdir -p -v dir6/dir7 // with version information
mkdir -m a=rwx // a=all user -m=permission

rmdir [-option] dirname


rm - remove file and dir
rmdir - remove emtry dir

mkdir abc - created a directory


rmdir abd - remove/delete abc directory
mkdir -p a/b/c/d/e
rmdir -p a/b/c/d/e

delete a nonempty dir


rm -r a/b - remove dir recurrsively
rm -i hello.txt -- i for prompt message
rm -f hello.txt - forcefully delete

rm -f *.txt - forcefully delete all .txt file


rem -f *.??? - forcefully delete with three word extention

Copy

cp [-option] source destination - for single file


cp [-option] source1 source2....sourcen destination - for multiple file

cat a.txt
cat b.txt
cp a.txt c.txt

permission

for moving use mv


for removing rm

Pumkin command

rm filename.txt /remove
mv file1 newfile /rename
ip addr show /ip address show
ipconfig
rename *.txt *.html /change the extention of all name

permission

chmod 764 ok.html / 7-for owner r+w+x 6-member of owner r+w 4- for other user r
folder create- mkdir foldername
grep -i pumpkin x/b/c/filename

find . -name filename /for location


find ~ -name *.jpg

ram size - free -m


df -h

touch abc.txt

tail -n 15 file.out /last 15 line

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy