Download presentation
Presentation is loading. Please wait.
Published byAndra O’Connor’ Modified over 6 years ago
1
Tonga Institute of Higher Education IT 141: Information Systems
Lecture 4: Files and Viruses
2
Files A file – the name we give to a single grouping of data that can be saved on any storage media (example, CD, DVD, hard disk, floppy disk, floppy disk and USB flash drive) A file is a way to indicate where bits for one file end and another start on media
3
Files A file can contain a group of records, a document , a photo , music , a video an message or a computer program.
4
Filenames Because there are many files, there is a need for naming them. There are special rules to follow to correctly name files. When save a file, valid file name should provide that adheres to specific rules – file – naming conventions These rules change based on what operating system you use.
5
Maximum length for file names
Today, most OS allow you to use longer file names to make file names more descriptive Current version of Windows support file names up to 255 characters long. That limitation includes the entire file path – drive letter, folders, file name and extension.
6
File name rules Why are certain characters not allowed in a file name?
If OS attaches special significance to a symbol, you might not be able to use it in a file name. e.g. C:Music 2. Don’t use the following characters (* : <> / \ | “? ) 3. Sometimes if you use an uppercase letter it will make a difference. Be careful
7
File name rules What are reserve words?
Some OS also contain a list of reserve words that are use as commands or special identifiers. These word can’t use as file name alone because it is invalid. E.g. Nul, Aux, Com1, Com2, Com3, Com4, Con, Lpt1, Lpt2, Lpt3, and Prn.
8
File Directories and folders
To designate a file’s location you must first specify the device where the file is stored The main hard drive is usually referred to as drive C followed by colon so hard disk drive could be designated as C:. Drive letter for CD, DVD and flash are not standardized because different device letter assigned in different computer.
9
File Directories and Folders
What is disk partition? A disk partition is a section of a hard disk drive that is treated as a separate storage unit. For example , a PC owner might set up one partition for OS files another partition for programs data.
10
File Directories and Folders
What is file specification? It is a computer file location and sometimes called path, which includes drive letter, folder(s), file name, and extension. Folders also refer to subdirectories that help you envision your files as if they were stored in a filing cabinet.
11
File name extensions File name extensions are the part of the filename that comes after the regular name. It identifies what kind of file it is. Example. Paint.exe (it is a program (Executable)) Example. MyLetter.doc (it is a word document) The extension will tell what kind of format the file is. Maybe it's a word document, excel spreadsheet, or a movie file
12
File Size and File Date A file will save other information besides the name. File size – how big the file is. How many bytes it contains. For example, a 1KB file 1KB equals 1 kilobyte (1000 bytes = 8000 bits). Very small. A file might be much bigger: Example 60 MB (60 Million bytes) File Date – when the file was created. Helpful if you are looking for something you just created
13
Directories When computers were first made, scientists thought it would be easy for users if files were stored in folders (also known as directories), just like a real filing system Directories allow us to organize files The first directory is called the “root” directory. On Windows this is “C:\” On Linux it is just “/”
14
File Management A file management programs allows you to organize data on your computer so that is it easier to use and find You can “manage” files using utility programs like windows explorer or sometimes application software will allow you to manage files These “file managers” let you copy, rename, delete and move files
15
File Management For example, suppose you write a letter
As you type the document is held in the memory (RAM), because the processor is using the document When you want to save, you click on “Save” or “Save as” Now you specify the name and location of the file. You have essentially managed the file
16
Save and Save as If you have never saved your file before, and your file needs a name, you will use Save As. If you have already saved once, just use Save.
17
File Management Metaphors
A metaphor is a way to describe something by using a different idea. File management uses the metaphor of a filing cabinet. Directories are like drawers for saving documents. Another metaphor is the “tree structure” where the branches represent directories, the root folder are the roots and the files are the leaves.
18
Tree structure
19
Windows Explorer Windows Explorer is the most common file management tool. It allows users to view directories, find and organize files. It is divided into two “window” panes. The pane on the left shows devices, hard disks, and folders The pane on the right will show icons for files
20
Windows Explorer
21
What can I do in Explorer
In Explorer, you're able to copy, rename, delete, and move folders and file. You can work with more than one file by pressing the Ctrl button and then clicking on the files you want to select You can select many by holding the shift key while clicking on different items You can move between panes with the tab key
22
File management tips A file management utility provides tools and procedures to help you keep track of your program and data files, but these tools are most useful when you have a logical plan for organizing your files and when you follow some basic management guidelines.
23
How is data stored? Explorer and file management utilities allow you to see the “logical storage model.” The logical storage model is the view of the file system that makes it easy for users to understand and manage The real way data is stored on storage media is called the “physical storage model”
24
Physical Storage Model
To save data, you must first format the storage media (ex. Floppy disk, CD, DVD). That means you must get it ready for data to be saved on it Formatting will organize the media into “tracks” which can then be divided into “sectors.” These sectors each have an address where data can then be saved on it
25
Sectors
26
File Systems How does the OS keep track of a files location?
It uses a “file system” that keeps track of names and locations of files that reside on a storage medium, such as hard disk. Different OS use different file system. Windows NT, 2000, XP, and Vista use file system called NTFS ( New Technology File System)
27
File System Windows 95, 98 and Me which is no longer use nowadays use a file system called FAT32. To speed up the process of storing and retrieving data, a disk drive usually works with group of sectors called cluster or a “block”. A file system primary task is to maintain a list of clusters and keep track of which are empty and which hold data.
28
File Systems This data is stored in a special file called the “Master file table”(MFT) if your computer use NTFS. If your computer use FAT32 file system then it use the special index file called File Allocation Table(FAT) If the “MFT” file becomes broken then your computer will not know where anything is saved and your hard drive will not be very useful.
29
Master File Table (MFT)
When you save a file, the operating system looks at the file allocation table to see what cluster is free. Then it will update the allocation table to indicate that the file is saved in that cluster If the file is too big to fit in one cluster, it will use more clusters that are next to it
30
Master File Table (MFT)
When you open a file, The OS looks up the filename in the Master File Table. It finds the correct cluster and sector on the hard drive Then it moves the read-write head on the hard disk to that spot. The read-write head will read that data The data is sent back to the RAM for the OS to use
31
What happens when you delete file?
If you want to delete a file, you might think that it is erased from the hard disk Instead the master file table is updated to say that cluster is now empty and can be used for new data There are programs that allow users to recover deleted items, because they are not really deleted To really delete a file, you can use special “file shredder software”, that overwrites supposedly empty sectors with random 1s and 0s.
32
Can deleted files be undeleted?
The Windows Recycle Bin and similar utilities in other OS are designed to protect you from accidentally deleting hard disk files you actually need Files in the Recycle Bin Folder can be undeleted so that they again appear in the regular directory. The Recycle Bin can be emptied to permanently delete any files it contains.
33
Fragmentation As computer writes files on a disk, parts of files tend to become scattered all over the disk and stored in noncontiguous clusters which refer to Fragmented files. Drive performance generally declines as the read-write heads move back and fourth to locate the clusters containing the parts of a file.
34
Defragmentation To regain peak performance, you can use a defragmentation utility, such as Windows Disk Defragmenter, to rearrange the files on a disk so that they are stored in contiguous clusters.
35
Computer Viruses Computer viruses cause big problems for people and businesses. A lot of time is wasted trying to fix these problems In 1986 the first virus appeared. Now there are 50,000 or more viruses and 10 to 15 new ones appear every day A virus is any software which damages your computer in anyway
36
Viruses A computer virus is a set of program instructions that attaches itself to a file, reproduces and spreads to other files. It can damage, delete or corrupt files and operating systems Viruses spread between computers because people spread them through floppy disks and attachments
37
Viruses Viruses will often attach to executable programs and wait to be run They may often “lurk” or hide for weeks or months before actually doing anything to your computer
38
Different kinds of viruses
File virus – attaches to a program and will infect the computer when that program is run Boot Sector – Infects your computer as soon as it is turned on. It lives in the memory where the computer saves the data it needs to start the computer (the BIOS) Macro virus – a set of instructions that is run by a program. Microsoft word allows you to write macros to do some tasks. A bad macro can destroy data or cause harm. That is a called a macro virus
39
Trojan Horses Trojan horses are programs that do something other than what they say they will do A Trojan horse might pretend to show pictures, but really steal your password. They are not called viruses, because they do not replicate or copy themselves
40
Worms and DoS A worm is a virus that is designed to spread from one computer to another computer over a network (unlike a virus which just spreads to files) DoS stands for Denial of Service attack. It is a program that tries to make computer networks really slow by sending useless data. It can make websites or servers unavailable for people who want to use them for real Sometimes DoS attacks are organized and come from many computers at the same time. These are called Distributed Denial of Service attacks
41
Malware: Spyware and Adware
Malware is a word used to describe many categories of "bad" software This bad software is usually installed onto a computer without the user knowing about it. The software installed will then do something that may not be legal For example, Spyware is software that monitors what the user does, like websites that are visited, time spent on the Internet, passwords that are entered and then reports the data to a company Adware is software that will display advertisements on computers all the time and even get new ads from the Internet Most Windows computers that are connected to the Internet suffer from Malware
42
How are viruses spread? Usually on CDs, floppy disks, from websites, downloads or attachments. If you download something from a website, you should make sure that it is from a good source. If you get an attachment and the file extension on the attachment is .exe it is probably a virus
43
How viruses are spread If you get an attachment, it cannot spread to the computer if you do not open it. DO NOT OPEN IT Sometimes a file will only be a Word document, but a virus can still be inside, because it will be a macro virus. Don’t open files from people you don’t know
44
What are the symptoms of a virus?
Computer displays strange messages There are strange visual and audio effects Computer works very slowly Your computer reboots suddenly Your computer sends by itself Your network or Internet access is very slow Sometimes there will be no symptoms
45
Antivirus software Anti-virus software protects your computer from viruses. It works by examining all the files and programs on a computers. If any of the files match a list of already known viruses, the anti-virus tries to remove it. To match a file, it looks for the "virus signature" within the file. If it cannot get rid of the file, it will try to isolate it at least.
46
Anti-virus Software Because anti-virus software can only detect viruses it knows about, it must always be updated You should always be using anti-virus software because viruses can come from many sources and it is better to be prepared. The anti-virus will automatically scan your computer whenever changes are made to make sure that no viruses have entered your computer
47
More types of viruses It is hard for anti-virus programs to detect all viruses because there are so many, and some of them are very smart Multi-partite viruses – will infect different targets (like files and boot sector) Polymorphic – they change so that their virus signature changes Stealth viruses – they hide when the anti-virus program checks for viruses Retro virus – these viruses attack the anti-virus program itself!!
48
Data Backup It is often important to save your data in two places, in case one place goes bad. Maybe your hard disk will break, your file system will break or your CD-ROM will get scratched If you have important data, save it in another place, because you never know what will happen
49
Data Backups You can make a backup of your entire computer (called full backup), but often it’s not worth it. You can always re-install the operating system and get the applications you had before The things you cannot replace are documents and files that you create. Those should be saved.
50
Summary File Management Data Storage Viruses Data backups
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.