database queryies
database queryies
23p-3046
Lab Task 03:
OPERATING SYSTEM LAB
SIR SAAD AHMED
CD:
the cd command is generally used for changing the current directory. But in this case when we
simply enter the command of cd without any parameter then it is used for to change the current
directory back to home.
Ls:
ls command is always used for to list all the directories or files of the current directory.
Touch newfile:
the touch command is generally used for creating a new file.
Ls > newfile;
this command is used to first list all the dierctorties in newfile and then will redirect the output to
newfile.
Cat:
the cat command is basically used to read the contents of a file. So this let us to add contents to
newfile.
Ls -lh:
this commond is used to print all the current directory data in a human readible format with date and
time of creation.
Ls -lh 1>filename:
this commond is used to output the data if the terminal is not target for printing. The item is moved
into the file.
Lsot and lsot 2>newfile:
this commond will copy the terminal output into the file:
------------------------------------------------------------------
# mkdir temporary
# cd temporary
temporary# ls
temporary# cat > newfile
Type any text and press CTRL+D
temporary# cat newfile
these are some basic command in which mkdir is used ot create a directory. Cd is used to change a
directory. Ls is used to list the directories in current file. Cat >newfile make newfile to read output
form the terminal.
Cp newfile:
we had copyfiles to newest from newfile ot newest.
Now we copy newfile to newester by direct coping. Then open another and we have newest in it.
now we are removing the temp directory but we cannot it directly since it in not null.
Rm temporary/* : command to deletes all the files with in temporary.
Removing from temporary recrsively and forcefully.
-----------------------------------------------------------------------------------
EXERSICE 01:
in the following image:
-------------------------------------------------------------------------------------------------------------------
EXERSICE 02:
creates all the required directories.
Subject: →math → physics