User Tools

Site Tools


bash:commands

This is an old revision of the document!


BASH - Commands

File Transfer

Command
Secure copy file to hostscp file.txt server2:/tmp
Synchronize source to destinationrsync -a /home/peter /backup/

Command
Search for a pattern in filesgrep pattern files
Search recursively for pattern in directorygrep -r pattern directory
Find all instances of filelocate filename
Find filenames that start with xxxfind /home/peter -name 'xxx*'
Find filesnames larger than 10000kfind /home/peter -size +10000k

Users

Command
Display who is logged inw
Show who is logged into the systemwho
Display who you are logged in aswhoami
Display information on a userfinger user
Show the active user id with login and groupid
Show last logins on the systemlast
Add a groupgroupadd groupname
Add a useradduser peter
Add a useruseradd -c “Peter Roux” - g admin -m peter # Add user peter
Delete a useruserdel peter
Modify user informationusermod peter
bash/commands.1611676055.txt.gz · Last modified: 2021/01/26 15:47 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki