od -c . does not work on mine

 
Thread Tools Search this Thread
Operating Systems Linux Fedora od -c . does not work on mine
# 1  
Old 02-27-2010
od -c . does not work on mine

[root@xsi Documents]# od -c .
od: .: read error: Is a directory
0000000

I read the book about shell (Kernighan, Pike) and some exaples (like this) does not work.
I read this book carefully (because I think now quickly) even reread to better understand.
In this book there is a good example how to see what a catalog looks like.
But on my Linux system (Fedora 12) it does not seem to work at all.
Also "chmod -w file" does not work for all users. --w--w--w- (only --w--------) but for x and r work good.
# 2  
Old 02-27-2010
Hi.

Of the systems on which I tried to use od with a directory, Solaris 10 failed, but (some versions of) IBM AIX, and HP-UX succeeded.

The K & R book was written a long time ago, before Linux was created. I do not know why Linux restricts commands like cat and od from dealing with directories.

The chmod behavior might be explained by the setting of your umask. See man umask for details ... cheers, drl
# 3  
Old 02-28-2010
Thx, and how can I vividly have a look at dump of a catalog (for learning purposes)?
Login or Register to Ask a Question

Previous Thread | Next Thread

6 More Discussions You Might Find Interesting

1. IP Networking

Discussion at work, would a router work pluging a cable in wan1 and lan1?

hi all. and sorry for the random question, but this sparkled a raging flame-war at work and i want more points of view situation a router, with linux of some sort, dhcp client requesting for ip in wan1 (as usual with wan ports) dhcp server listening in lan1, and assigning ip (as usual... (9 Replies)
Discussion started by: broli
9 Replies

2. Shell Programming and Scripting

My script work on Linux but not work in sunos.

My script work on Linux but not work in sun os. my script. logFiles="sentLog1.log sentLog2.log" intial_time="0 0" logLocation="/usr/local/tomcat/logs/" sleepTime=600 failMessage=":: $(tput bold)Log not update$(tput rmso) = " successMessage="OK" arr=($logFiles)... (7 Replies)
Discussion started by: ooilinlove
7 Replies

3. IP Networking

NIC will not work, but it did work.

I have a client machine that was built and loaded with SCO UNIX 2.1.3, (yes it is old). The machine worked fine on the closed network that I tested on in my shop. I then had to change it to the network that it would be connected to. Below is the host file, router and subnet mask file that I usually... (0 Replies)
Discussion started by: NC user
0 Replies

4. What is on Your Mind?

What are Your Favorite Chips? Mine are Doritos Nacho Cheesier!

By far, Doritos Nacho Cheesier are the best tasting chips, well at least too me. Have you tried them? What are your favorite chips? (5 Replies)
Discussion started by: Neo
5 Replies

5. UNIX for Dummies Questions & Answers

Script doesn't work, but commands inside work

Howdie everyone... I have a shell script RemoveFiles.sh Inside this file, it only has two commands as below: rm -f ../../reportToday/temp/* rm -f ../../report/* My problem is that when i execute this script, nothing happened. Files remained unremoved. I don't see any error message as it... (2 Replies)
Discussion started by: cheongww
2 Replies

6. UNIX for Dummies Questions & Answers

Your favorite command and mine - grep

Is their a way to grep for only one occurrence? Here is an example: given the file information: BCX 3 5 BCX 23 94 BNG 34 34 BCX 2 09 if I do: grep BCX ./file then i get them all, how can i get just one of them. But let's say there could be a variable number of the desired... (5 Replies)
Discussion started by: wxornot
5 Replies
Login or Register to Ask a Question