mkdir command is used to create directories. The command is followed by the names of the directories to be created.
$ mkdir virani
This command creates the directories virani
$ mkdir stud1 stud2 stud3
This command will create three directories stud1,stud2,and stud3.
$ mkdir virani virani/sci virani/arts
This creates three directories virani,two sub directories sci and arts under virani.The order of specifying arguments is important; you obviously can’t create a sub directory before creation of its parent directory.
Sometimes the system refuses to create a directory:
$mkdir maths
mkdir : can’t make directory maths
This can happen due to these reasons:
• The directory maths may already exist.
• There may be an ordinary file by that name in the current directory.
• The user doesn’t have the permission to create a directory.
Showing posts with label Unix Commands... Show all posts
Showing posts with label Unix Commands... Show all posts
Apr 2, 2011
who am i
The who command ,when used with the arguments “am” and “I”, displays a single line output only,i.e the login detail pertaining to the user who invoked this command.
$ who am i
vsc tty01 Dec 25 09:35
$ who am i
vsc tty01 Dec 25 09:35
who command
who command gives the list of the users currently working on various terminals.
$who
vsc tty01 Dec 25 09:35
atmiya tty02 Dec 25 08:50
student tty03 Dec 25 09:45
$who –Hu
USER LINE LOGIN-TIME IDLE PID COMMENTS
vsc tty01 Dec 25 09:35 . 24
student tty02 Dec 25 09:40 0:30 25
-H is for header and –u option provides more detailed list
The idle column shows that student seems to be idling for last6 30 minutes. PID shows the process identification number.
$who
vsc tty01 Dec 25 09:35
atmiya tty02 Dec 25 08:50
student tty03 Dec 25 09:45
$who –Hu
USER LINE LOGIN-TIME IDLE PID COMMENTS
vsc tty01 Dec 25 09:35 . 24
student tty02 Dec 25 09:40 0:30 25
-H is for header and –u option provides more detailed list
The idle column shows that student seems to be idling for last6 30 minutes. PID shows the process identification number.
passwd command
passwd command is used to change passwords
$ passwd
old password:
new password:
Re-enter new password:
Passwd when invoked by ordinary user ,it asks for old password. After which it demands to enter new password twice. if you are logged on as root you can directly change the password.
In Linux
[root@localhost]passwd vsc
changing password for vsc
new password:
Subscribe to:
Posts (Atom)