Sponsored Content
Full Discussion: what is a file ?
Top Forums UNIX for Dummies Questions & Answers what is a file ? Post 302708413 by vpundit on Monday 1st of October 2012 01:49:54 PM
Old 10-01-2012
little odd questions but i can try and answer a few of them.

because unix/linux is mostly command based your files will mostly be text based. this is why when you do a
Code:
cat more vi <file>

you are able to see the contents. similar to a .bat file in windows.

lets say this for example:
you have a script you need to run but you don't know what extension it uses (typically you wont need to know unless your writing the script) - but at the first line you'll see what application it's starting example : perl, ksh. sh, bash etc.

usually looks something like this:

Code:
#!/usr/bin/ksh

this tells the script that it's using "ksh" to run the script.

as for your last question.

unix/linux can be controlled with permissions much like windows, only thing is in unix/linux you'll need to be root in order to change anything i don't want other users to have access to, no exceptions. windows there are many ways to fool around and get access to a file that a user doesn't want you to see but this is one of the things as why unix/linux is a lot more secure. (of course there are other ways but i wont get into that Smilie )

basicly you set the permissions, owner, group to something only you have access to and then other users wont be able to read it, write, or execute.

that's a basic summary. remember for majority of these questions you can find the answers on google.

like i said it's a bit odd of a question and i'm not 100% sure how to answer it but this is my opinion of it "determines what file your using"
This User Gave Thanks to vpundit For This Post:
 

3 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Match list of strings in File A and compare with File B, C and write to a output file in CSV format

Hi Friends, I'm a great fan of this forum... it has helped me tone my skills in shell scripting. I have a challenge here, which I'm sure you guys would help me in achieving... File A has a list of job ids and I need to compare this with the File B (*.log) and File C (extend *.log) and copy... (6 Replies)
Discussion started by: asnandhakumar
6 Replies

2. Shell Programming and Scripting

Compare 2 text file with 1 column in each file and write mismatch data to 3rd file

Hi, I need to compare 2 text files with around 60000 rows and 1 column. I need to compare these and write the mismatch data to 3rd file. File1 - file2 = file3 wc -l file1.txt 58112 wc -l file2.txt 55260 head -5 file1.txt 101214200123 101214700300 101250030067 101214100500... (10 Replies)
Discussion started by: Divya Nochiyil
10 Replies

3. Shell Programming and Scripting

Shell script (sh file) logic to compare contents of one file with another file and output to file

Shell script logic Hi I have 2 input files like with file 1 content as (file1) "BRGTEST-242" a.txt "BRGTEST-240" a.txt "BRGTEST-219" e.txt File 2 contents as fle(2) "BRGTEST-244" a.txt "BRGTEST-244" b.txt "BRGTEST-231" c.txt "BRGTEST-231" d.txt "BRGTEST-221" e.txt I want to get... (22 Replies)
Discussion started by: pottic
22 Replies
Linux::Distribution(3pm)				User Contributed Perl Documentation				  Linux::Distribution(3pm)

NAME
Linux::Distribution - Perl extension to detect on which Linux distribution we are running. SYNOPSIS
use Linux::Distribution qw(distribution_name distribution_version); if(my $distro = distribution_name) { my $version = distribution_version(); print "you are running $distro, version $version "; } else { print "distribution unknown "; } Or else do it OO: use Linux::Distribution qw(distribution_name distribution_version); my $linux = Linux::Distribution->new; if(my $distro = $linux->distribution_name()) { my $version = $linux->distribution_version(); print "you are running $distro, version $version "; } else { print "distribution unknown "; } DESCRIPTION
This is a simple module that tries to guess on what linux distribution we are running by looking for release's files in /etc. It now looks for 'lsb-release' first as that should be the most correct and adds ubuntu support. Secondly, it will look for the distro specific files. It currently recognizes slackware, debian, suse, fedora, redhat, turbolinux, yellowdog, knoppix, mandrake, conectiva, immunix, tinysofa, va-linux, trustix, adamantix, yoper, arch-linux, libranet, gentoo, ubuntu, scientific, oracle enterprise linux and redflag. It has function to get the version for debian, suse, fedora, redhat, gentoo, slackware, scientific, oracle enterprise linux, redflag and ubuntu(lsb). People running unsupported distro's are greatly encouraged to submit patches :-) EXPORT None by default. TODO
Add the capability of recognize the version of the distribution for all recognized distributions. AUTHORS
Alexandr Ciornii <alexchorny@gmail.com>, <http://chorny.net> Alberto Re, <alberto@accidia.net> Judith Lebzelter, <judith@osdl.org> COPYRIGHT AND LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.5 or, at your option, any later version of Perl 5 you may have available. perl v5.14.2 2012-03-18 Linux::Distribution(3pm)
All times are GMT -4. The time now is 08:05 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy