06-01-2008
well i found a multiple choice question for this.
Which one of the following allows the Unix version 6 system to differentiate between a file and a device?
a) the arguements to the system call that opens the file or device
b) the mode bits within the inode indetified by the system call
c) the directory entry for the file or device
d) the pathname for the file or device
any thoughts?
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I have to read a complete folder and if it is a file older that 7 days I have to copy it elsewhere and if it is a folder nothing to make.
The way I do it:
for I in `find /home/. -name "*" -mtime +7`
do
cp -Rf $I /home/elsewhere/.
done
Am I okay with the way I want to do it?
Help... (3 Replies)
Discussion started by: denysQC
3 Replies
2. Shell Programming and Scripting
Hi everybody,
This time I am having one issue in perl.
I have to create comma separated file using the following type of information. The problem is the columns do not have any specific delimiter. So while using split I am getting different value. Some where it is space(S) and some where it is... (9 Replies)
Discussion started by: Amiya Rath
9 Replies
3. Shell Programming and Scripting
Hi All,
I am new to this unix stuff.I just have one doubt:suppose i have two tar files and sometimes it happens that when we just check these files from outside these two tar files look same
"Eg:
ls -lrt
drw-r--r-- 1 oasis logadmin 37067 Apr 3 05:48 file1.tar
drw-r--r-- 1 oasis ... (7 Replies)
Discussion started by: siri_14
7 Replies
4. Shell Programming and Scripting
Can anyone decribe what would be differnce between the following scripts:
#nohup /bin/sh ./job 2>& 1&
# ./job > nohup.out &
Thanks
Alvida (1 Reply)
Discussion started by: alvida
1 Replies
5. Shell Programming and Scripting
I got two file write now.
Input file 1:
>data_1
DSFDFDSGFDSGSGEGTRTRERPOYIORPGKKGDSPKFSDKFPSDKFSPFS
>data_34
WEEREREWREWOIQOPIEPDSKLFNDSFNSKNCASKJHDAFHAOUDFEOWWIOUFEWIUEWIRUEWIRUEWIORUEWOREWR
>data_21
ASDASDQWEQWRQERFWPOTGIUWEIPOFIOFDSNFKSJDNFSKDHFKDSJHFKDSJHF
>data_4... (14 Replies)
Discussion started by: perl_beginner
14 Replies
6. UNIX for Dummies Questions & Answers
can anyone explain the difference between $* and $@?
pandeeswaran@ubuntu:~/training$ bash dollarstar 1 2 3 "4 5" 6
1
2
3
4
5
6
1
2
3
4
5
6
pandeeswaran@ubuntu:~/training$ cat dollarstar
#!/bin/bash
for i in $@
do (4 Replies)
Discussion started by: pandeesh
4 Replies
7. Shell Programming and Scripting
how to differentiate file and directory name using ls command.
l (3 Replies)
Discussion started by: jhon123
3 Replies
8. AIX
Folks,
Any idea of where can I find a specific file to differentiate JRE and Java JDK installed on AIX platform :cool: (3 Replies)
Discussion started by: dellcisco
3 Replies
9. Shell Programming and Scripting
Hello All,
I have 2 Type of files.
1. MYTEST001_RKP_DORALDO_20150402120000.zip
2. CMP001_STD001_MOGANO_RPSL_20150409_C.zip
I can receive these Two type of file at one location.
If i receive second type of file
CMP001_STD001_MOGANO_RPSL_20150409_C.zip I have to process without... (9 Replies)
Discussion started by: yadavricky
9 Replies
10. UNIX for Beginners Questions & Answers
Hi,
I don't have tree on the Solaris server and our SA don't want to install it. I found this example from One Line Linux Command to Print Out Directory Tree Listing | systemBash that more or less does what I am mainly looking for.
Example run is as below:
$: find ./ | sed -e... (2 Replies)
Discussion started by: newbie_01
2 Replies
LEARN ABOUT NETBSD
swapon
SWAPON(3) BSD Library Functions Manual SWAPON(3)
NAME
swapon -- add a swap device for interleaved paging/swapping
SYNOPSIS
#include <unistd.h>
int
swapon(const char *special);
DESCRIPTION
This interface is provided for compatibility only and has been obsoleted by swapctl(2).
swapon() makes the block device special available to the system for allocation for paging and swapping. The names of potentially available
devices are known to the system and defined at system configuration time. The size of the swap area on special is calculated at the time the
device is first made available for swapping.
RETURN VALUES
If an error has occurred, a value of -1 is returned and errno is set to indicate the error.
ERRORS
swapon() succeeds unless:
[ENOTDIR] A component of the path prefix is not a directory.
[ENAMETOOLONG]
A component of a pathname exceeded {NAME_MAX} characters, or an entire path name exceeded {PATH_MAX} characters.
[ENOENT] The named device does not exist.
[EACCES] Search permission is denied for a component of the path prefix.
[ELOOP] Too many symbolic links were encountered in translating the pathname.
[EPERM] The caller is not the super-user.
[ENOTBLK] special is not a block device.
[EBUSY] The device specified by special has already been made available for swapping
[EINVAL] The device configured by special was not configured into the system as a swap device.
[ENXIO] The major device number of special is out of range (this indicates no device driver exists for the associated hardware).
[EIO] An I/O error occurred while opening the swap device.
[EFAULT] special points outside the process's allocated address space.
SEE ALSO
swapctl(2), swapctl(8), swapon(8)
HISTORY
The swapon() function call appeared in 4.0BSD and was removed NetBSD 1.3
BUGS
This call will be upgraded in future versions of the system.
BSD
June 4, 1993 BSD