answersLogoWhite

0

📱

Unix

Unix is a family of operating systems primarily designed for servers, mainframes, and high-end workstations. First created in 1969, Unix systems are renowned for their security and stability.

1,127 Questions

Is ls is external or internal command?

The 'ls' command is an external command (found in /bin)

What is smitty in aix?

'smit/smitty' is the administrator tool for configuration in AIX.

How do you display the values in shell script?

Use the builtin 'echo' or 'print' command followed by the shell variable name, which will substitute the value when printed/displayed.

How do you write a c program for diff command that we use in unix?

Too difficult to answer here. I would find the source code and use that (if you really had to). Might require a 'port' to another operating system if it wasn't Unix based.

Who are the principal architects of the UNIX operating system?

The principals were Richie and Thompson, along later with Kernighan (for C).

What file systems are supported by FreeBSD?

UFS is the main filesystem for FreeBSD, but ZFS is also a popular choice. ext2, msdos, ntfs (read-only), and smb are also supported.

What are the key difference bitween freely distributable unix and propretary implementtation?

Freely distributable Unix/Linux systems come with the source code, which can be modified.

Proprietary Unix systems are distributed as binary only, with no source code, so you can't modify the system (easily).

Other reasons are legal: the proprietary systems are copyrighted, and the freely distributable versions should not have any copywritten code in them, thus allowing them to be distributed without licensing arrangements.

Where is the running configuration file stored?

You don't mention what you are looking for in terms of a "running configuration file". In Unix/Linux there are many of these. Most of them can be found in the /etc directory or its subdirectories but not all of them are located in /etc.

What type of information is kept by Unix-like systems about each file on your computer?

The filesystem will keep metadata like filename, file permissions, file type (as far as whether it's a regular file, a directory, a named pipe, device file, and so on), file creation and modified date. In addition, if the filesystem being used utilizes inodes, it will also have information on the inode that file is on.

How do you read a pdf file name using a shell script?

Your question is unclear; Are you talking about reading a filename that happens to contain PDF, or reading a PDF file itself?

The shell script doesn't know or care what kind of files you are using. It all depends on what you intend to do with the file.

Parse log files-shell script?

There are following shell scripts available at the below mentioned url -

1. Shell Script for Log4j Log Analysis and exception reporting2. Log Monitoring Shell Script - email upon errors

Hope that's what you are looking for.

Which task can you perform with the dd command?

There are lots of tasks you can perform with the dd command. The most common would be to create an image file from a disk or partition. Another use would be to create an empty file of an arbitrary size.

Shell script that copies multiple files to a directory?

That's what cp(1) program is good for: cp this that "something else" /dir/to/

Where are the system administration's commands and configuration file are stored?

Most of the Unix command names are short, single words in lowercase. The commands are

basically programs written in C. Traditionally, Unix system programs are stored in directories

called /bin and /usr with additional programs usually used only by system administrators in

/etc and /usr Many versions of Unix also have programs stored in /usr

What are the most appropriate methods for naming and storing files?

This is installation and company specific; it cannot be answered as a general question.

What is a size of ASCII file that contains 200 characters?

200 characters is 200 characters, unless you are talking about Unicode (which isn't Ascii).

How do you program in shell to print even no?

Solution 1: echo 2 4 6 8 10

Solution 2: seq 2 2 100

About which protocols does the netstat -s command print information?

Netstat reports on the common tcp/ip protocols, including (but not limited to) TCP, UDP, ICMP, socket connections.

How do you move a file in UNIX using relative addressing?

#include<sys/types.h>

#include<sys/stat.h>

#include<fcntl.h>

#include<stdio.h>

#include<unistd.h>

#include<string.h>

int main()

{

int fd1,fd2;

char name1[100],name2[100];

char str[6];

int n;

printf("enter name of file to move");

scanf("%s",name1);

printf(enter new location);

scanf("%s",name2);

fd1=open(name1,O_RDONLY);

fd2=open(name2,O_WRONLY);

while(1)

{

n=read(fd1,str,sizeof(str));

printf("%s \n",str);

if(n==0)

break;

write(fd2,str,n);

}

close(fd1);

close(fd2);

unlink(name1);

}

What are Nawk scripts?

Nawk is an Awk replacement on *nix operating systems. It is very good at sorting data in columns and search functions. A classic awk command would be:

"$awk '/Home/ {print $3}' file > home.txt"

this consists of calling the awk interpretor to open the file "file", telling it to search for the word "Home" and when it finds that, print the 3rd column from that line out to a file named home.txt.

Awk automatically uses tab (\t) as the field separator ($FS) and you can change this if the input file uses something else besides the tab, e.g. : or ; or & and so on. there are a lot of awk tutorials on the web and most are pretty good.

What is the command used for zipping a file in Unix?

cvcvvb

I can't say anything about the answer above, but if you are referring to a zip-like archive that can be used on windows then you can use the 'zip' command. This is not built-in to Unix, but is available as an open-source project (just google for it).

If you are interested in creating an compressed archive, then there are many tools, include gzip, compress, and others.