I'm looking at writing something that handles changing directory in the calling shell and wanted to take a look at the cd command.
comes back with nothing and
does nothing either.
Where is the cd command?
I can see why it wouldn't be with the rest of the commands in /bin as it wouldn't change the directory in the calling shell if it was run in a sub-shell like the other commands are.
Is it part of the kernel?
If so would it be possible to write a kernel module to do what I want? I've been looking at tutorials on kernel programming but haven't found anything that tells me if I can extend the basic Unix command set this way. Most of the examples seem to be driver oriented or basic hello world examples writing to the logs.
Thanks. I've already written this (PushPop) in Korn shell and it works very well but is of course now dependent on the user being a Korn shell user. I now want to implement the project independently of the user's login shell.
Hi Perderabo
Thanks that's really helpful.
Could you elaborate a little more? As a Korn shell user, when I type cd is the Korn shell using a built in to call chdir()? So every shell such as bash and C etc has its own wrapper called cd?
I'm looking at writing something that handles changing directory in the calling shell and wanted to take a look at the cd command.
comes back with nothing and
does nothing either.
Where is the cd command?
I can see why it wouldn't be with the rest of the commands in /bin as it wouldn't change the directory in the calling shell if it was run in a sub-shell like the other commands are.
Is it part of the kernel?
If so would it be possible to write a kernel module to do what I want? I've been looking at tutorials on kernel programming but haven't found anything that tells me if I can extend the basic Unix command set this way. Most of the examples seem to be driver oriented or basic hello world examples writing to the logs.
Any help appreciated
Cheers
Hi,
'cd' command is not part of the kernel. though it is the part of the shell. Its a shell built-in. The other commands are external to the shell like 'file', 'find' . If a command is shell built-in the shell can invoke it directly . But if its outside the shell, the shell normally creates another process. As pointed above, almost all the commands (userspace) utilities like shell, daemon processes, commands (file, find, etc) uses system calls which in turn is in kernel space.
Hi All,
We've a VDI infrastructure in AWS (AWS workspaces) and we're planning to automate the process of provisioning workspaces. Instead of going to GUI console, and launching workspaces by selecting individual users is little time consuming. Thus, I want to create them in bunches from AWS CLI... (6 Replies)
Hi everyone,
I am trying to prevent the ehci_hcd kernel module to load at boot time.
Here's what I've tried so far:
1) Add the following line to /etc/modprobe.d/blacklist.conf (as suggested here):
2) Blacklisted the module by adding the following string to
3) Tried to blacklist the module... (0 Replies)
Hi,
I have 80 large files, from which I want to get a specific value to run a Bash script. Firstly, I want to get the part of a file which contains this:
Name =A
xxxxxx
yyyyyy
zzzzzz
aaaaaa
bbbbbb
Value = 57
This is necessary because in a file there are written more lines which... (6 Replies)
Hello,
There's a third-party application's command that shows the application's status like "tail -f verybusy.log". When use the command, the output comes every 1-sec. but when it goes in a script below the output comes every 8-sec...What is the problem and how can I fix it?
open(CMD,... (2 Replies)
Hi,
I am using SunOS
I want to serch my previous command
from unix prompt
(like on AIX we can search by ESC -k)
how to get in SunOs
urgent help require. (10 Replies)
Hi gurus
Could anybody tell me which file is read by kernel to set its default system kernal parameters values in solaris. Here I am not taking about /etc/system file which is used to load kernal modules or to change any default system kernal parameter value
Is it /dev/kmem file or something... (1 Reply)
Hi there,
I am lil confused with the following issue.
I have a File, which has the following header: IMSHRATE_043008_101016
a sample detailed record is :9820101 A982005000CAVG030108000000000000010169000MAR 2008
9820102 MAR 2008 D030108
... (1 Reply)
Hi All,
Is there a max number of slabs that can be used per kernel module? I'm having a tough time finding out that kind of information, but the array 'node_zonelists' (mmzone.h) has a size of 5. I just want to avoid buffer overruns and other bad stuff.
Cheers,
Brendan (4 Replies)
I've noticed most of my postings here are because of syntax errors.
So I want to begin compiling a large txt file that contains all the "man <cmd>" of the commands I most have problems with. I ran a "man nawk >> nawk.txt" but it included a header/footer on each "page". Anyone know how I'd be... (6 Replies)