Doubt in ls command


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Doubt in ls command
# 8  
Old 01-06-2014
Let me tell you

When you just type

1. ls -d it just shows the present directory which is denoted by ' . '
2. If you try using
ls -d * it just lists all the files inside the current directory
ls -d * | wc -l would give you the count of total number of files

Man pages for ls would say as said below,

-d
Displays only the information for the directory named. Directories are treated like files, which is helpful when using the -l flag to get the status of a directory.


Let me know if you need any further clarifications,

Cheers,
Adi
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Grep command doubt

Hi all, I need to find the line by using grep command with the two occurence of word in the same line. I tried the below example it prints the word choice. cat nohup.out Dictionary utl is completed. file is completed. Dictionary file is completed. grep 'Dictionary\|file'... (0 Replies)
Discussion started by: arun888
0 Replies

2. Shell Programming and Scripting

Mailx command doubt

hi all, I would need to add the description in the below syntax. let me know the below syntaxt how it can be changed to add the description in the below. ps -ef | grep "server" | mailx -s "servers currently which are running" operational@acel.com Server 62 -> Used for User acessing.... (14 Replies)
Discussion started by: arun888
14 Replies

3. UNIX for Advanced & Expert Users

Doubt on setserial command

My understanding is that "setserial" command is used to change the attributes of serial device files (ttyS) managed by the linux serial driver(serial module). My doubt is, using setserial command is it possible to change the attributes of other serial device files managed by a different driver... (2 Replies)
Discussion started by: Kesavan
2 Replies

4. Shell Programming and Scripting

command substitution doubt

Hi, I almost always use back quotes in scripts to assigin output of a command to a variable. eg: file=`basename a/b/c/d/file` year_mon=`date +%Y%m` But the same can be achieved like: file=$(basename a/b/c/d/file) year_mon=$(date +%Y%m) I would like to know if there is... (3 Replies)
Discussion started by: wanderingmind16
3 Replies

5. Shell Programming and Scripting

Doubt with ftp command

Hi linux experts, I am using ftp command as : ftp hostname but it says unable to connect, if i am using the same in sftp it is working : sftp hostname it works. so please help me how should i use ftp command. (8 Replies)
Discussion started by: salil2012
8 Replies

6. Shell Programming and Scripting

locate command doubt !!!

Hello, I want to search for a file/directory named "abc" which is located anywhere in the given unix system. I am using the command :- But the problem is that this is giving me all combinations of files with have 'abc' in their name. But can I know the option to be used to get the location... (5 Replies)
Discussion started by: nsharath
5 Replies

7. Shell Programming and Scripting

doubt in banner command !!!

hello, I am using banner command in my shell.I used :- The problem is that the output is printed in 3 separate lines.I want to display it in a single line.If the size is not enough then at least 2 words should come in the same line. Can you tell me what is the option in banner that would help... (4 Replies)
Discussion started by: nsharath
4 Replies

8. UNIX for Dummies Questions & Answers

doubt in tr command

Hi, I am trying to understand a script and found a line as follows: tr '\211\233\240' '\040' < $IN_FILE | tr -cd '\11\12\15\40-\176' > $TEMP_FILE Can any one explain the above line .. What are they trying to translate using the tr command.. I have not used tr command.. so feeling little bit... (2 Replies)
Discussion started by: risshanth
2 Replies

9. UNIX for Advanced & Expert Users

Doubt in SED command

PLEASE EXPLANIN ME... sed 's~\(.*\)\(<name>\)\(.*\)\(</name>\)\(.*\)~\2\3\4~' this is the format <start><name>123<\name><addr>BAC<\addr><loc>sfo<\loc></start> (1 Reply)
Discussion started by: gksenthilkumar
1 Replies

10. Shell Programming and Scripting

Doubt in find command

Hi All, I wanted to list all the files in the current directory which contains the pattern "error". I tried the following grep command grep -i 'error' *.* but i got the error message "ksh: /usr/bin/grep: 0403-027 The parameter list is too long." Any idea why the grep didn't work? Note:... (3 Replies)
Discussion started by: mona
3 Replies
Login or Register to Ask a Question
ppmtosixel(1)						      General Commands Manual						     ppmtosixel(1)

NAME
ppmtosixel - convert a portable pixmap into DEC sixel format SYNOPSIS
ppmtosixel [-raw] [-margin] [ppmfile] DESCRIPTION
Reads a portable pixmap as input. Produces sixel commands (SIX) as output. The output is formatted for color printing, e.g. for a DEC LJ250 color inkjet printer. If RGB values from the PPM file do not have maxval=100, the RGB values are rescaled. A printer control header and a color assignment table begin the SIX file. Image data is written in a compressed format by default. A printer control footer ends the image file. OPTIONS
-raw If specified, each pixel will be explicitly described in the image file. If -raw is not specified, output will default to com- pressed format in which identical adjacent pixels are replaced by "repeat pixel" commands. A raw file is often an order of magni- tude larger than a compressed file and prints much slower. -margin If -margin is not specified, the image will be start at the left margin (of the window, paper, or whatever). If -margin is speci- fied, a 1.5 inch left margin will offset the image. PRINTING
Generally, sixel files must reach the printer unfiltered. Use the lpr -x option or cat filename > /dev/tty0?. BUGS
Upon rescaling, truncation of the least significant bits of RGB values may result in poor color conversion. If the original PPM maxval was greater than 100, rescaling also reduces the image depth. While the actual RGB values from the ppm file are more or less retained, the color palette of the LJ250 may not match the colors on your screen. This seems to be a printer limitation. SEE ALSO
ppm(5) AUTHOR
Copyright (C) 1991 by Rick Vinci. 26 April 1991 ppmtosixel(1)