Introduction
I am constantly ploughing through countless web search pages looking for a Linux command I used in 1994 that floats around in my memory teasing me with qualities of omnipotence, the panacea. Well, this is where I will capture them and store them, my butterfly jar of Linux commands !User Stuff
Become omnipotent (root access):sudo -s
Who is logged in:
whoami
Create a user, this will also create a home folder and password:
adduser <name>
List all users:
List all users:
cat /etc/passwd
Delete a user:
userdel userName
List all groups:
cat /etc/group
mkdir <folder>
Make a file:
touch <filename>
Change permissions:
chmod 777 <file>
Remove a folder:
rmdir <folder>
Find a file:
find . -name <filename>
Find a
grep -i <string> <files>
Find a
grep -r 'string string' .
List all files and file info:
ls -al
List all groups:
cat /etc/group
File Manipulation
Create a folder:mkdir <folder>
Make a file:
touch <filename>
Change permissions:
chmod 777 <file>
Remove a folder:
rmdir <folder>
Find a file:
find . -name <filename>
Find a
string in a file (ignore case):grep -i <string> <files>
Find a
string in a file, searching all sub-folders:grep -r 'string string' .
List all files and file info:
ls -al
No comments:
Post a Comment