1 / 26

find – used to find files corresponding to a certain criteria

New Unix/Linux commands. find – used to find files corresponding to a certain criteria find starting_dir matching_criteria [ options ] Examples: find / usr –name startx find / usr –name ‘* tif ’ find . –name dir05 –type d (d – directory, f - file)

jpaulson
Download Presentation

find – used to find files corresponding to a certain criteria

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. New Unix/Linux commands • find – used to find files corresponding to a certain criteria find starting_dirmatching_criteria [options] Examples: find /usr –name startx find /usr –name ‘*tif’ find . –name dir05 –type d (d – directory, f - file) find /etc –size +300 (size more than 300 blocks – one block is 512 bytes) find . –mtime +5 (matches files modified more than 5 days ago) find ~ –perm 777 find ~ –user stud03 –ls > listastud03

  2. grep (usually used to search inside a file or in the output of a command) grep [options] what_to_searchfile_name Examples: grep root /etc/passwd grep test ./* ls –la | grep –i ‘mar 16’ (-i ignore case)

  3. OS structure and components http://zota.ase.ro/os

  4. OS components & structure • Components • System calls • Components integration • Virtual machines

  5. SO components Process management Main memory management File management I/O system management Secondary memory management Network connection Protection system Command interpreter system

  6. Process management A process is an instance of a program in execution (if a program is passive, a process isactive). A process has access to several resources (CPU time, memory, files) and it has attributes to be managed. The process management includes the following: Process scheduling (establishing priorities, time management, etc.) Creation/Termination Blocking/Unblocking(Suspending/Reloading) Synchronization Communication Deadlock management Debugging

  7. Memory management • Process, files and I/O operations allocation/de-allocation. • Simultaneous processes management • It takes into account who is using memory • Moving process memory from/to secondary memory

  8. File management A file is a collection of data or information defined by its creator. Normally, the files may represent programs (source programs or executable programs) or data. The OS is responsible with the following activities related to file management: • Creating and erasing the files • Creating and erasing the directories • Oferring support for handling files and directories • Moving files to secondary storage • Making backups for file on non-volatile storage media

  9. I/O & secondary memory management • I/O • Generic code for device drivers • Drivers for each device – translate the reading/writing demands in positioning commands on disk Secondary memory • Disks, magnetic-optical storage, etc. • Free space management(paging/swapping) • Allocating space on disk(what data are written and where on the disk) • Scheduling reading/writing from/to disk

  10. OS components Network connection • Communication system between distributed processors • Getting information about files/processes, etc. on a remote machine • Can use a “message passing” model or a shared memory model Protection • Files, memory, CPU, etc. • = Access control • Depends on the attributes of a file or user System programs • Compilers/link-editors/assemblers, etc. • Communications (ftp, telnet, ssh, etc.) • Command interpreters– programs that take control sequences (comenzi) (shell, interfaţă grafică) How these components interacts ? Alloffer services one another

  11. OS components A system call represents the main way a user program interacts with the OS.

  12. System call functioning • Get access to system space • Parameters validation • Call system’s resources • Interrogates an equipment/system for a certain element • It suspends waiting for an equipment • The interrupt may have the result that a thread is ready to execute • Masking • Return to user There are more steps involved in a system call read (fd, buffer, nbytes)

  13. There are two main methods to transfer data between programs: Message passing Shared memory

  14. System calls examples:

  15. OS structure “Assembling” the OS components A simple structure: MS-DOS Application programming Resident system programs Obs: All these levels can access the hardware MS-DOS drivers ROM - BIOS device drivers

  16. Windows NT/2000 architecture

  17. NT Kernel The NT kernel is dealing with the whole traffic of messages inside the OS and is running over HAL. The NT kernel is occupied with interrupts & exceptions handling for the communication between the subsystems and the hardware resources of the OS. An integral part of the communication management of the subsystems, the NT kernel is responsible with the constant checking with the security subsystem of the NT executive tin order to assure the fact that demand services were authorized accordingly.

  18. NT Kernel • The NT kernel is responsible for: • Synchronizing multiple processors when Windows is running on a computer with symmetrical multiprocessing (multiprocessor machine); • Handling interrupts and exceptions; • System recovery in case of failure; • Checking security restrictions and/or violations; • Threads programming in the multi-threading environment • Interrupt handling is occupying the most part of the kernel time, an interrupt being generated for each interaction of the NT executive subsystems. • The NT kernel is running in privileged modeand it cannot expelled from memory.

  19. NT Executive • The NT Executiveis made of the NT kernel plus a variety of subsystems known as system services. • Examples of this kind of services are: • I/O manager • Local procedure call manager; • Object manager; • Process manager; • Virtual memory manager; • Security monitor.

  20. I/O manager The main task of it is to manage all the inputs and outputs for the OS. The I/O manager manages the communications between device drivers, network drivers, cache memory management and file system drivers. Device driversare written specially to support certain peripherals like printers, keyboards and mouse. Due to this standardized medium the device drivers can run on any platform which supporting Windows. These drivers are written in C and can be easily modified. Among the network drivers we may find:NetBIOS, SMB server interface. Alco, there are included the most common communication protocols like TCP/IP, IPX/SPX, NetBEUI, etc.

  21. Windows 8 architecture

  22. Android vs. Windows 8 An interesting article: Android vs. Windows 8 https://dzone.com/articles/introducing-windows-8-android

  23. Unix structure

  24. Virtual machines Definition from techopedia.com: “A virtual machine (VM) is a software program or operating system that not only exhibits the behavior of a separate computer, but is also capable of performing tasks such as running applications and programs like a separate computer. A virtual machine, usually known as a guest is created within another computing environment referred as a "host." Multiple virtual machines can exist within a single host at one time.” Virtual user User Virtual machine “Monitor mode” Physical machine

  25. Virtual machines

  26. Virtual machines applications Examples (free apps): VirtualBox (Win/Mac/Linux), VMware (Win/Linux), QEMU (Linux) VirtualBox (Sun/Oracle) - http://www.virtualbox.org/wiki/VirtualBox VMware - http://www.vmware.com/products/player/faqs.html QEMU – wiki.qemu.org

More Related