Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Write a command to display date, day , month and year using different options Wr

ID: 3685816 • Letter: W

Question

Write a command to display date, day , month and year using different options
Write a command to display the files and directories that begin with aa, bb and cc
Write a command to display all the files or directories whose name contains 4 alphabets
Write a command display all the files that begin with any character between a and p followed by 3 characters
Create a directory structure in home directory which include two directories dir1 and dir2
Create files, file1 in dir1 and file2 in dir2 using vi editor.

Explanation / Answer

1.Write a command to display date, day , month and year using different options

ANS:: System date :: $ date
o/p:Thu Dec 5 22:55:41 WIB 2013

Date and time in RFC 2822 format :: $ date -R
o/p:Thu, 05 Dec 2013 23:40:53 +0700

Universal Time :: date -u
o/p:Thu Dec 5 16:45:58:UTC 2013

2.Write a command to display all the files or directories whose name contains 4 alphabets

find /tmp . -name '????' OR $ ls *.????

where tmp:directory name

find /tmp -type f -name '????'

3. Create a directory structure in home directory which include two directories dir1 and dir2

to create directory : mkdir homedir

Open a terminal and use the mkdir command to create empty directory.
$ mkdir homedir

Go to homedir and create two directories within it.

The following command would create two directories within the current directory:

$ mkdir dir1 dir2

4. Create files, file1 in dir1 and file2 in dir2 using vi editor.

to create file:

vi filename

cp file1 dir1

this cmd will copy file1 to dir1

cp file2 dir2

this cmd will copy file2 to dir2

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote