Is this a bug of linux's "ls" command?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Is this a bug of linux's "ls" command?
# 1  
Old 02-28-2008
Is this a bug of linux's "ls" command?

I found an interesting thing with ls. do the following steps in your linux:
open a terminal
mkdir x
cd x
echo "aaa" > test1
ls
<you will see test1>

Don't close the terminal, open another terminal
rm -r x
mkdir x
cd x
echo "aaa" > test2
ls
<you will see test2>

Now go to the first terminal,
ls
<you will see nothing! no test2 here!>
cd ../x
ls
<you now see test2>

ls can not dynamically update its directory information! This could be dangerous for multiple users sharing a filesystem.
Is this a bug?

My system is ubuntu. 2.6.20-16-generic
# 2  
Old 02-28-2008
Same on HP-UX

I saw same thing on HP-Unix, ( B.11.00).When I did a listing the second time in terminal one, I got this message:

Code:
ls

. not found

After cd-ed back and forth, then I saw test2 in terminal one.

Code:
ls

test2

 
Login or Register to Ask a Question

Previous Thread | Next Thread

3 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Using "mailx" command to read "to" and "cc" email addreses from input file

How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address and column 3 contains “cc” e-mail address to include with same email. Sample input file, email.txt Below is an sample code where... (2 Replies)
Discussion started by: asjaiswal
2 Replies

2. Cybersecurity

Tor Browser Bundle for Linux (2.2.35-8) "EVIL bug"

There is an EVIL bug in at least the Linux (2.2.35-8) Tor Browser Bundle start-tor-browser script. It will log things like domain names to a file in the root of the browser bundle. trac.torproject.org/projects/tor/ticket/5417 Ticket #5417 (new defect) RelativeLink.sh in Tor browser bundle... (0 Replies)
Discussion started by: madeinindia
0 Replies

3. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies
Login or Register to Ask a Question