bash:commands
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
bash:commands [2021/01/26 15:45] – [Packages] peter | bash:commands [2021/01/26 16:57] (current) – peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== BASH - Commands ====== | ====== BASH - Commands ====== | ||
+ | |||
+ | ---- | ||
+ | |||
+ | [[BASH: | ||
+ | |||
+ | [[BASH: | ||
+ | |||
+ | [[BASH: | ||
+ | |||
+ | [[BASH: | ||
+ | |||
+ | [[BASH: | ||
+ | |||
+ | ---- | ||
[[BASH: | [[BASH: | ||
Line 10: | Line 24: | ||
[[BASH: | [[BASH: | ||
+ | |||
+ | [[BASH: | ||
[[BASH: | [[BASH: | ||
Line 21: | Line 37: | ||
[[BASH: | [[BASH: | ||
- | [[BASH: | + | [[BASH: |
- | ---- | + | [[BASH: |
+ | [[BASH: | ||
- | + | [[BASH:Commands: | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | ===== File Transfer ===== | + | |
- | + | ||
- | | ^Command^ | + | |
- | |Secure copy file to host|scp file.txt server2:/tmp| | + | |
- | |Synchronize source to destination|rsync -a /home/peter /backup/| | + | |
Line 44: | Line 52: | ||
- | |||
- | ===== Process ===== | ||
- | |||
- | | ^Command^ | ||
- | |Display your currently active processes|ps| | ||
- | |Find all processes related to " | ||
- | |Memory map of process|pmap| | ||
- | |Display all running processes|top| | ||
- | |Kill process with specific pid id|kill id| | ||
- | |Kill all processes named xxx|kill xxx| | ||
- | |Resumes suspended job without bringing them to the foreground|bg| | ||
- | |Brings the most recent job to the foreground|fg| | ||
- | |Bring job n to the foreground|fg n| | ||
- | |||
- | ---- | ||
- | |||
- | ===== Search ===== | ||
- | |||
- | | ^Command^ | ||
- | |Search for a pattern in files|grep pattern files| | ||
- | |Search recursively for pattern in directory|grep -r pattern directory| | ||
- | |Find all instances of file|locate filename| | ||
- | |Find filenames that start with xxx|find /home/peter -name ' | ||
- | |Find filesnames larger than 10000k|find /home/peter -size +10000k| | ||
- | |||
- | |||
- | ---- | ||
- | |||
- | ===== Users ===== | ||
- | |||
- | | ^Command^ | ||
- | |Display who is logged in|w| | ||
- | |Show who is logged into the system|who| | ||
- | |Display who you are logged in as|whoami| | ||
- | |Display information on a user|finger user| | ||
- | |Show the active user id with login and group|id| | ||
- | |Show last logins on the system|last| | ||
- | |Add a group|groupadd groupname| | ||
- | |Add a user|adduser peter| | ||
- | |Add a user|useradd -c "Peter Roux" - g admin -m peter # Add user peter| | ||
- | |Delete a user|userdel peter| | ||
- | |Modify user information|usermod peter| | ||
bash/commands.1611675907.txt.gz · Last modified: 2021/01/26 15:45 by peter