Write shell script to print prime numbers in a given range?
echo enter a range
read rng
echo 2
j=3
while test $j -le $rng
do
i=2
x=`expr $j - 1`
while test $i -le $x
do
if [ `expr $j % $i` -ne 0 ]
then
i=`expr $i + 1`
else
break
fi
done
if [ $i -eq $j ]
then
echo $j
fi
j=`expr $j + 1`
done
What can you use to extract a 4gb rar file in a FAT32 file system?
You can't. a FAT 32 file system does not support files larger than 4GB in size. You will have to convert the file system to NTFS in order to unarchive it there.
What is the purpose of a chroot jail?
a chroot jail is the common expression used to describe a section of a filesystem that is sectioned off for a particular user.
On a web server, it is particularly useful for the security of shared hosting accounts.
What is the use of more command in unix?
The 'more' command is considered a 'pager' program, which means it displays 1 screen page at a time as it pages through the file. This program allows you to look at the contents of a file one screen at a time, at your speed ..
What processes are constructive and what processes are destructive?
It do spell the boy know you, therefore, if you go, you will be able to attend go you, you go
Hope the answer helps guys
Whose trademark is the operating system UNIX?
A. T. & T. because it was developed at Bell Labs.
However Bell Labs no longer exists and A. T. & T. has been sold several times and is no longer the same company, but all its trademarks were sold with it.
I'm not sure what company now owns A. T. & T.
In windows, NTFS, the bigger your folder and more files in it, the slower the access will be. It is not the case with UFS used in Unix, as the performance will not be hindered by large volumes and a big quantity of files in a given folder.
What is 3 differences between software interface and command line interface?
Differentiate between Command line interface and Menus interface and example of each interaction style
An SSH server is a daemon that listens for requests to log in using SSH from remote computers. SSH basically allows you to control a Linux or Unix computer just as if you were sitting at the physical machine.
What are stored in a file's inode?
Mostly depends on the filesystem, but generally it'll be the name of the file, the kind of file it is (Regular, directory, or link.), where the file is found physically, which can be multiple values. File's size, and I believe also file permissions.
Unix (officially trademarked as UNIX®, sometimes also written as Unix or Unix® with small caps) is a computer operating system originally developed in 1969 by a group of AT&T employees at Bell Labs including Ken Thompson, Dennis Ritchie and Douglas McIlroy.
It is important because counting all of the various flavors of UNIX (freeBSD, openBSD, Solaris, HP-UX,etc. also sort of Mac OS-X) and all of the Linux Flavors (which are sort of descendants of UNIX systems) would make up a large portion of all of the computers in operation.
Unix is important in and of itself because it was designed to handle multiple stations connecting to a central hub which, in turn, may itself be connected to other hubs. This defines a network with a star topology which, amazingly enough, is the same as the basic structure of the entire internet.
In a nut shell UNIX is an operating system which at one point in time, was the most prevalent operating system in use. It is still widely used in scientific and professional circles. Unix is one of the oldest but still most popular Operating Systems. It was invented in 1969 at AT&T Bell Labs by Ken Thompson and Dennis Ritchie. All the contemporary operating systems of Solaris, HP-UX, Linux, AIX are variants of Unix. Unix is a family of multi-user operating systems. It was originally developed by AT&T in the 1970s. Unix has a very strong security and model and relatively simple design, making it popular and fairly easy to implement. Many operating systems are either based on or modeled after the first Unix systems, such as Linux, Solaris, or Mac OS X.
What is the difference between RSH and SSH?
rsh and ssh are similar in that they can execute commands on remote systems. The main difference between the two (besides the actual TCP ports) is that rsh traffic is not encrypted and therefore a security risk; ssh traffic is encrypted.
The other main difference is that ssh is a secure replacement for telnet, whereas rsh can log into a remote system using the rlogin protocol, which is similar but not the same as telnet.
How do you move to your home directory using a relative path name?
There are several ways to do this. The easiest way is just to type the command 'CD', which automatically puts you in your home directory. Other ways:
CD $HOME
CD ~
CD ~login-id (use your login-id here)
If you know the absolute path name, just use it with the 'CD' command:
CD /home/staff/guy1
There are several ways to do this (typical Unix ...).
you could execute the following command:
du | sort -n | tail -6
The 'du' command lists disk usage by listing a file name and size per line, then use the sort command to list numerically, and the last 6 will be the 6 largest.
What is the difference between echo cat and cat echo commands in Linux?
echo cat will print out the word 'cat' on the command line.
cat echo will attempt to list the contents of a file called 'echo'.
A "pipe" is where output is redirected to another program. It exists in Windows as well as Unix (although you don't see much of it in Windows usage).
The character used in piping is the pipe character ('|').
For example, you wanted to create a MD5 hash of the message "Hello World!" you'd do echo "Hello World!" | md5sum. The echo command will output "Hello World" to standard output (also called stdout), and the pipe will redirect that to the md5sum utility, which will calculate the MD5 hash from the output as input.