Linked Questions

0 votes
1 answer

Why is my CD command not working on a home-built shell? [duplicate]

I have written a very basic shell in C. It reads the input, then runs it using system(lineCopy); (lineCopy being a copy of the input). All commands will run fine in it, other than cd. When I try to cd ...
user avatar
2 votes
0 answers

What is the difference between test, [, and [[ in terms of binary vs. builtin? [duplicate]

It is often written: /usr/bin/test is a synonym for /usr/bin/[ [[ is a bash improvement for [ test and [ are also builtins I understand the difference between [ and [[ but I am confused with the ...
Honza Hejzl's user avatar
141 votes
7 answers

Why is cd not a program?

I've always wondered why cd isn't a program, but never managed to find the answer. Anyone know why this is the case?
AkshaiShah's user avatar
  • 3,609
169 votes
4 answers

What exactly is POSIX?

I see POSIX mentioned often and everywhere, and I had assumed it to be the baseline UNIX standard.. until I noticed the following excerpt on a Wikipedia page: The Open Group The Open Group is ...
Peter.O's user avatar
  • 32.7k
107 votes
2 answers

What is the difference between interactive shells, login shells, non-login shell and their use cases? [duplicate]

Possible Duplicate: Difference between Login Shell and Non-Login Shell? I have been looking at /etc/profile. bash.bashrc to see how they are run, and notice that some are executed by non-login ...
vfclists's user avatar
  • 7,391
49 votes
8 answers

Why are POSIX mandatory utilities not built into the shell?

The purpose of this question is to answer a curiosity, not to solve a particular computing problem. The question is: Why are POSIX mandatory utilities not commonly built into shell implementations? ...
Kyle's user avatar
  • 655
71 votes
1 answer

How do you time how long a command took to run? [duplicate]

How would you find out how long a running process took to complete? Example: date; dd bs=1m if=/foo of=bar; date ^This example only has 1 second of resolution. Any shell is acceptable.
spuder's user avatar
  • 17.9k
30 votes
3 answers

What is the purpose of square bracket executable

I see there is an executable called "[" in /usr/bin. What is its purpose?
Alexandru Irimiea's user avatar
19 votes
2 answers

How are system commands like ls created?

I have some doubts regarding *nix. I don't know which type of executable file is ls, whether it is .sh or .ksh or any other kind of system executable if it is, what is that? when I tried to see what ...
Jeyanthinath's user avatar
7 votes
5 answers

IFS=',' /usr/bin/read vs IFS=',' read

Context $ bash --version GNU bash, version 4.4.19(1)-release (x86_64-redhat-linux-gnu) Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <
WMC's user avatar
  • 171
12 votes
2 answers

Understanding shell builtin commands

In in the bash manual, it's written that Builtin commands are contained >>> within <<< the shell itself Also, this answer states that A built-in command is simply a command that ...
manifestor's user avatar
  • 2,453
12 votes
4 answers

When are the built-in commands loaded to memory

Let's say if I type in cd in my shell. Is cd loaded from the memory at that moment? My intuition is that these built-in commands are pre-loaded to the system memory after the kernel has been loaded, ...
Forethinker's user avatar
  • 1,389
13 votes
2 answers

Differences between keyword, reserved word, and builtin?

From Make bash use external `time` command rather than shell built-in, Stéphane Chazelas wrote: There is no time bash builtin. time is a keyword so you can do for instance time { foo; bar; } We ...
Tim's user avatar
  • 100k
3 votes
3 answers

How to know what are commands, system calls, bash built-ins, etc?

A coworker recently asked "What is man"? After being informed that not all things accessible from the Bash CLI are commands, I was wary to call man a command. man man just calls it an ...
dotancohen's user avatar
  • 15.7k
3 votes
2 answers

Edit tree to output in custom format?

I'd like to get a custom output from the tree command, but unlike this question, I don't have a fixed format. I'd like to be able to give the command the format in an argument (for instance perhaps -f=...
AncientSwordRage's user avatar

15 30 50 per page