Basic Linux Commands For Beginnners
Directory Commands
Commands | Operation |
---|---|
|
Create directory named abc
|
|
Create directory if it does not exist
|
|
Create all directories and subdirectories if they do not exist
|
|
Show the current directory
|
|
Change to directory abc
|
|
Change to the parent directory
|
|
Change to the sibling directory xyz
|
|
Change back to previous directory
|
|
List files in directory
|
|
List files, including dot-files, with extra info
|
|
List files in reverse size order; w/friendly size
|
File Operations
Commands | Operation |
---|---|
|
update file last modified date; create file if not exists
|
|
output contents of file
|
|
paged output contents of file
|
|
copy file1 to file2
|
|
mv file1 to file2
|
|
delete file
|
|
show the first 5 lines of file
|
|
show the last 5 lines of file
|
|
show the last few lines of the file and follow output
|
Shell Shortcuts
Commands | Operation |
---|---|
|
Stop the current command
|
|
Go to start of line
|
|
Go to end of line
|
|
Search command history
|
|
Clear the screen
|
|
Run last command
|
|
Run last command that starts with abc
|
Simple Regular Expressions
Commands | Operation |
---|---|
|
match any character once
|
|
match the preceding character 0 or more times
|
|
match the preceding character 1 or more times
|
|
match the preceding character 0 or 1 time
|
|
group patterns
|
|
match the pattern on the left OR right
|
|
match the start of the line
|
|
match the end of the line
|
Shell Variables
Commands | Operation |
---|---|
|
Show all environment variables
|
|
Show a specific environment variables
|
|
Create a local variable
|
|
Create a variable accessible by child processes
|
|
Used node.js code; expects value to be production or anything else
|
|
Home directory
|
Great post Sudip sir ?❤️?
Dhanyabaad Bibek sir ?