Looking for a Tutor Near You?

Post Learning Requirement »
x

Choose Country Code

x

Direction

x

Ask a Question

x

x
x
x
Hire a Tutor

Computer Notes

Loading...

Published in: Basic Computer
1,788 Views

i am just uploading the notes of basic computers and c language, Artificial intelligence, pattern recognition etc

Deepak S / Noida

15 years of teaching experience

Qualification: M.Tech.(Computer Science)

Teaches: Basic Computer, MS Office, All Subjects, Computer, English, Mathematics, Computer Science, Physics, School Level Computer, Data Structures, DBMS & RDBMS, Java Script, PHP And MySQL

Contact this Tutor
  1. Computer concept & C prog. Subject Code Tutorial — 01 - ECS-IOI Sem. I Q. 1 What is a faster way to do the same command? mv fileO.txt newdir mv filel.txt newdir mv file2.txt newdir mv file3.txt newdir A. A shortcut method would be: mv file?.txt newdir Q.2 List two ways to create a new file: a. Copy a file to make a new file. b. Use the output operator e.g. Is -l > newfile.txt Q.3 What is the difference between > and operators? A. The operator > either overwrites the existing file (WITHOUT WARNING) or creates a new file. The operator either adds the new contents to the end of an existing file or creates a new file. .Q4. Write the command to do the following: 4.1 Redirect the output from the directory listing to a printer. 4.2 Add the file efg.txt to the end of the file abc.txt. 4.3 The file testdata feeds information into the file called program 4.4 Observe the contents of the file called xyz.txt using MORE. 4.5 Observe a directory listing that is four screens long. 4.1 Is > Ipr 4.2 cat efg.txt abc.txt 4.3 program < testdata 4.4 more < xyz.txt 4.5 Is > dirsave I more
  2. Computer concept & C prog. Q. 1 How do you estimate file space usage Subject Code Tutorial - 02 - ECS-IOI Sem. I A. Use du command (Summarize disk usage of each FILE, recursively for directories.) Good to use arguments du -hs (-h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G) (-s, --summarize display only a total for each argument) Q.2 How can you see all mounted drives? A. mount -l Q. 3How can you find a path to the file in the system? A. locate file _ name (locate - list files in databases that match a pattern) Q.4 What Linux HotKeys do you know? A. Ctrl-Alt-F1 Exit to command prompt Ctrl-Alt-F7 or F8 Takes you back to KDE desktop from command prompt Crt1-A1t-Backspace Restart XWindows Ctrl-Alt-D Show desktop Q.5 What can you tell about the tar Command? A. The tar program is an immensely useful archiving utility. It can combine an entire directory tree into one large file suitable for transferring or compression.
  3. Computer concept & C prog. Q. 1 What types of files you know? A. Files come in eight flavors: Normal files Directories Hard links Symbolic links Sockets Named pipes Character devices Block devices Subject Code Tutorial — 3 - ECS-IOI Sem. I Q.2 How to copy files from on PC to another on the same network A. Use the following command:scp yur_file you_login@your_IP example: copy .conf file from your PC to alex computer- scp /etc/X11/xorg.conf alex@ 10.0.10.169:
  4. Computer concept & C prog. Q. 1 Please describe information below: Subject Code Tutorial — 4 - ECS-IOI Sem. I -rw-rw-r-- 1 dotpc dotpc 102 Jul 18 2003 file.buf drwxr-xr-x 9 dotpc dotpc 4096 Oct 21 09:34 bin Irwxrwxrwx 1 dotpc dotpc 20 Mar 21 15:00 client -Y client-2.9.5 drwxrwxr-x 11 dotpc dotpc 4096 Sep 2 2005 client-2.8.9 drwxrwxr-x 7 dotpc dotpc 4096 Dec 14 12:13 data drwxr-xr-x 12 dotpc dotpc 4096 Oct 21 09:41 docs drwxr-xr-x 5 dotpc dotpc 4096 Dec 7 14:22 etc drwxr-xr-x 11 dotpc dotpc 4096 Mar 21 15:54 client-2.9.5 -rw-r--r-- 1 dotpc dotpc 644836 Mar 22 09:53 client-2.9.5.tar.gz A. This is a result of command $1s -l we have two files, 6 directories and one link to client-2.9.5 directory. There is number of files in every directory, size and data of last change. Q.2 If you would like to run two commands in sequence what operators you can use? A. ; or && the difference is: if you separate commands with ; second command will be run automatically. if you separate commands with && second command will be run only in the case the first was run successfully. Q.3 How you will uncompress the file? A. Use tar command (The GNU version of the tar archiving utility): tar -zxvf file_name.tar.gz Tutorial — 5
  5. Computer concept & C prog. Subject Code — ECS-IOI Q. 1 How do you execute a program or script, my _ script in your current directoty? A. ./my_script Q.2How to find current time configuration in the file my_new.cfg A. grep time my_new.cfg Grep searches the named input files (or standard input if no files are named, or the file name - is given) for lines containing a match to the given pattern. Q. 3What does grep() stand for? A. General Regular Expression Parser. Q.3 What does the top command display? A. Top provides an ongoing look at processor activity in real time. It displays a listing of the most CPU-intensive tasks on the system, and can provide an interactive inter—I face for manipulating processes. (q is to quit) Q. 4How can you find configuration on linux? A. by using /sin/ifconfig If no arguments are given, ifconfig displays the status of the cur- Sem. I rently active interfaces. If a single interface argument is given, it displays the status of the given interface only; if a single -a argu- ment is given, it displays the status of all interfaces, even those that are down. Otherwise, it configures an interface. Tutorial — 07
  6. Computer concept & C prog. Subject Code - ECS-IOI Sem. I Q. 1 How to find difference in two configuration files on the same server? A. Use diff command that is compare files line by line diff -u /usr/home/my_project1/etc/ABC.conf /usr/home/my_project2/etc/ABC.conf Q.2 What is the best way to see the end of a logfile.log file? A. Use tail command - output the last part of files tail -n file _ name ( the last N lines, instead of the last 10 as default) Q.3 Please write a loop for removing all files in the current directory that contains a word 'log' A. for i in *log* ; do rm $i; done Q 4. Question: How to switch to a previously used directory? Answer: cd - Q.5 How to remove directory with files? A. rm -rf directory _ name Q.6 What is the difference between internal and external commands? A. Internal commands are stored in the; same level as the operating system while external commands are stored on the hard disk among the other utility programs. Q.7 List the three main parts of an operating system command: A. The three main parts are the command, options and arguments. Q.8 What is the difference between an argument and an option (or switch)? A. An argument is what the command should act on: it could be a filename, directory or name. An option is specified when you want to request additional information over and above the basic information each command supplies. Q.9 What is the purpose of online help? A. Online help provides information on each operating system command, the syntax, the options, the arguments with descriptive information.
  7. Computer concept & C prog. Q. 1 Name two forms of security. Subject Code Tutorial — 8 - ECS-IOI Sem. I A. Two forms of security are Passwords and File Security with permissions specified. Q.2 What command do you type to find help about the command who? A. $ man who Q.3 What is the difference between home directory and working directory? A. Home directory is the directory you begin at when you log into the system. Working directory can be anywhere on the system and it is where you are currently working. Q.4 Which directory is closer to the top of the file system tree, parent directory or current directory? A. The parent directory is above the current directory, so it is closer to the root or top of the file system. Q.5 Given the following pathname: $ /business/acctg/payable/supplier/april a) If you were in the directory called acctg, what would be the relative pathname name for the file called april? b) What would be the absolute pathname for april? a) $ payable/supplier/april b) $ /business/acctg/payable/supplier/april