Skip to content

Commit 8795e39

Browse files
Added Linux Commands blog
1 parent 678621a commit 8795e39

File tree

1 file changed

+156
-0
lines changed

1 file changed

+156
-0
lines changed

Blogs/Linux Commands.txt

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
Linux Commands
2+
3+
1. cd
4+
change dir
5+
cd .. - to move up
6+
cd ~ - move to home dir from anywhere
7+
8+
2. ls
9+
list dir contents
10+
ls -l : long listing info
11+
ls -a : list all files (including hidden files)
12+
ls -r : list in reverse order
13+
ls -t : sort by time & date
14+
ls -s : sort by file size
15+
16+
3. man (manual)
17+
man ls
18+
19+
4. echo
20+
echo -n : no new line
21+
echo -e : for backslash esc seq
22+
23+
5. cal (calendar)
24+
cal -1 : single month (curr)
25+
cal -3 : 3 months spanning curr
26+
cal -s : 1st day as sun
27+
cal -m : 1st day as mon
28+
cal -j : feb 1st = 32nd day format
29+
cal -y : full yr cal
30+
31+
6. date
32+
33+
7. clear
34+
35+
8. cat
36+
create
37+
display
38+
concatenate
39+
---cat > file1.txt
40+
creates file1.txt & allows us to insert content in it. Press ctrl+c to exit.
41+
---cat file.txt > newfile.txt
42+
copy content of file to newfile (override the present content of newfile). Create newfile if it doesn't already exists.
43+
---cat file.txt >> newfile.txt
44+
append. create newfile if not there.
45+
---cat file1.txt file2.txt
46+
display contents of both files
47+
---cat f1.txt f2.txt > combinedfile.txt
48+
concatenates f1 & f2 & writes in combinedfile
49+
50+
9. pwd
51+
52+
10. who
53+
54+
11. whoami
55+
prints username associated with the curr effective user ID
56+
57+
12. uname
58+
prints info about curr sys
59+
60+
13. passwd
61+
to change password of user acc
62+
63+
14. mkdir
64+
to make dirs
65+
66+
15. rmdir
67+
removes empty dirs from ur file sys
68+
69+
16. cp (copy cmd)
70+
71+
17. mv (move)
72+
73+
18. rm (remove)
74+
to delete files & dirs
75+
76+
19. cut
77+
extracts a given number of chars or cols from a file
78+
79+
20. paste
80+
displays the corresponding lines of multiple files side-by-side
81+
82+
21. more
83+
The more command is a command line utility for viewing the contents of a file or files once screen at a time.
84+
85+
22. cmp
86+
87+
23. comm
88+
Compare two sorted files line by line.
89+
90+
24. diff
91+
This command is used to display the differences in the files by comparing the files line by line.
92+
93+
25. chmod
94+
95+
26. chown
96+
change owner
97+
98+
27. chgrp
99+
change group
100+
101+
28. file
102+
to determine a file's type
103+
104+
29. finger
105+
looks up and displays information about system users.
106+
107+
30. sleep
108+
to delay for a specified amount of time.
109+
110+
31. ps (proc state)
111+
Reports a snapshot of the status of currently running processes.
112+
113+
32. kill
114+
to terminate processes manually.
115+
116+
33. wc
117+
used to find out number of newline count, word count, byte and characters count in a files specified by the file arguments.
118+
119+
34. ln
120+
creates links between files.
121+
122+
35. nl
123+
numbers the lines in a file.
124+
125+
36. head
126+
makes it easy to output the first part (10 lines by default) of files.
127+
128+
37. tail
129+
prints the last few number of lines (10 lines by default) of a certain file, then terminates.
130+
131+
38. sort
132+
used to sort a file, arranging the records in a particular order.
133+
134+
39. find
135+
searches for files in a directory hierarchy.
136+
137+
40. uniq
138+
reports or filters out repeated lines in a file.
139+
140+
41. grep
141+
searches a file for a particular pattern of characters, and displays all lines that contain that pattern.
142+
143+
42. pipe ( | )
144+
output of each process directly as input to the next one like a pipeline.
145+
146+
43. tr (translate)
147+
for translating or deleting characters.
148+
149+
44. history
150+
to view the previously executed command.
151+
152+
45. write
153+
sends a message to another user.
154+
155+
46. wall
156+
send a message to everybody’s terminal.

0 commit comments

Comments
 (0)