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

Basic Commands in Unix

Uploaded by

Anish Kulkarni
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)
36 views

Basic Commands in Unix

Uploaded by

Anish Kulkarni
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/ 2

1816386@MUMYP10ILP005 MINGW64 ~/Desktop/unixpractice (master)

$ pwd
/d/Users/1816386/Desktop/unixpractice

1816386@MUMYP10ILP005 MINGW64 ~/Desktop/unixpractice (master)


$ mkdir foldername

1816386@MUMYP10ILP005 MINGW64 ~/Desktop/unixpractice (master)


$ touch newfile.txt

1816386@MUMYP10ILP005 MINGW64 ~/Desktop/unixpractice (master)


$ cat newfile.txt

1816386@MUMYP10ILP005 MINGW64 ~/Desktop/unixpractice (master)


$ cat > newfile.txt
this is new file

1816386@MUMYP10ILP005 MINGW64 ~/Desktop/unixpractice (master)


$ cat >> newfile.txt
and this is new content

1816386@MUMYP10ILP005 MINGW64 ~/Desktop/unixpractice (master)


$ cat newfile.txt
this is new file
and this is new content

1816386@MUMYP10ILP005 MINGW64 ~/Desktop/unixpractice (master)


$ ls
'Unix Introduction and Basic commands_V1.0.odp' awk.txt
foldername/ 'how to run shell script commands.txt' sbq1.txt
test.txt
'awk commands.txt' 'basic commands in unix.txt' 'how
to run awk commands.txt' newfile.txt sbq2.txt

1816386@MUMYP10ILP005 MINGW64 ~/Desktop/unixpractice (master)


$ cp newfile.txt copyfile.txt

1816386@MUMYP10ILP005 MINGW64 ~/Desktop/unixpractice (master)


$ man
bash: man: command not found

1816386@MUMYP10ILP005 MINGW64 ~/Desktop/unixpractice (master)


$ man mv
bash: man: command not found

1816386@MUMYP10ILP005 MINGW64 ~/Desktop/unixpractice (master)


$ whoami
1816386

1816386@MUMYP10ILP005 MINGW64 ~/Desktop/unixpractice (master)


$ cat test.txt
ID Name Age Company Skills
1 shubh 23 tcs programmer
2 lokesh 21 xyz tester
3 rahul 27 google trainer

1816386@MUMYP10ILP005 MINGW64 ~/Desktop/unixpractice (master)


$ sort test.txt | uniq
1 shubh 23 tcs programmer
2 lokesh 21 xyz tester
3 rahul 27 google trainer
ID Name Age Company Skills

1816386@MUMYP10ILP005 MINGW64 ~/Desktop/unixpractice (master)


$ cat test.txt | head -2 | tail -1
1 shubh 23 tcs programmer

1816386@MUMYP10ILP005 MINGW64 ~/Desktop/unixpractice (master)


$ cal
bash: cal: command not found

1816386@MUMYP10ILP005 MINGW64 ~/Desktop/unixpractice (master)


$ cat > newfile.txt
unix is awesome

1816386@MUMYP10ILP005 MINGW64 ~/Desktop/unixpractice (master)


$ cat newfile.txt
unix is awesome

1816386@MUMYP10ILP005 MINGW64 ~/Desktop/unixpractice (master)


$ grep -c "unix" newfile.txt
1

1816386@MUMYP10ILP005 MINGW64 ~/Desktop/unixpractice (master)


$ grep -w "unix" newfile.txt
unix is awesome

1816386@MUMYP10ILP005 MINGW64 ~/Desktop/unixpractice (master)


$ grep -o "unix" newfile.txt
unix

1816386@MUMYP10ILP005 MINGW64 ~/Desktop/unixpractice (master)


$ grep -i "Unix" newfile.txt
unix is awesome

1816386@MUMYP10ILP005 MINGW64 ~/Desktop/unixpractice (master)


$ sed 's/unix/linux/' newfile.txt
linux is awesome

1816386@MUMYP10ILP005 MINGW64 ~/Desktop/unixpractice (master)


$

You might also like