You can use the -e and -f options like below.
$ useradd -e 2017-02-28 -f 60 john
User Profile
Collapse
Profile Sidebar
Collapse
edizgeorgi
Last Activity: Jun 11 '20, 07:14 PM
Joined: Oct 17 '19
Location:
-
-
You can use the shutdown command + option like below.
$ sudo shutdown -h +3Leave a comment:
-
It is easier than you think. Use the usermod command with root privileges. Following example will remove the user george from the root group.
$ sudo usermod -G root georgeLeave a comment:
-
It is very easy just put the script file path after the ssh command like below.
ssh ismail@192.168. 142.144 'bash -s' < cat myscript.shLeave a comment:
-
No. You shouldn’t write a bash script. Just use the cp command bulk copy feature and provide all files you want to copy and add the path which is the destination.
cp file1 file2 file3 /mnt/backupLeave a comment:
-
There are different ways. You can also use the systemd but as you are asking for init.d use the following command.
sudo /etc/init.d/networking startLeave a comment:
-
Python provides exists() function which can be used like below.
Code:import os.path if(os.path.exists("/etc/passwd")): print("/etc/passwd exists")Leave a comment:
-
You can use bash infinite loops with the while loop like
while true; do echo "test"; sleep 60; doneLeave a comment:
No activity results to display
Show More
Leave a comment: