Is there any command in Unix, other than:ls, to list the
files in a directory?
The answer will be highly appreciated...
Answers were Sorted based on User's Feedback
Answer / nik
You can use find command with - type f. It will print all
the files in the current dir recursively.
Is This Answer Correct ? | 13 Yes | 6 No |
Answer / chetan
Hi,
echo *.* will list out all the files in a directory.
( all files are assumed to be having some extension)
Is This Answer Correct ? | 12 Yes | 7 No |
Answer / ravi
you can use the file command, eg file *. Actually file
command is used to display type of the file given as argument.
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / ashish
echo * simply.it lists files and directories in pwd. no hidden files r displayed
Is This Answer Correct ? | 4 Yes | 1 No |
Answer / pritish
echo * | tr " " "\n"
this will display all the files in the current directory
sequentially...
you can also use dir command.
Is This Answer Correct ? | 4 Yes | 1 No |
Answer / kishore devkate
Hi Yankee,
There are so many commands to display the files in the
present working directory without using ls command, find
the below commands,
echo *
dir
du -sk *
....etc
but we have to think logical how to view the file without
using ls.
Is This Answer Correct ? | 2 Yes | 0 No |
When i run a programm of orphan process. Instead of getting child's parent (ppid)=1 ..i get 1400 and it varies as per system. How can i findthe right soluion??? My pgm: #include<stdlib.h> # include <stdio.h> int main() { int pid; pid=fork(); if(pid < 0) {exit(-1);} else if(pid==0) { printf("Child Process is Sleeping ..."); sleep(10); printf("Orphan Child's Parent ID : %u ",getppid()); } else { printf("Parent Process Completed ... %u ",getpid()); exit(0); } return 0; } Output:
Describe the usage and functionality of the command rm –r * in unix?
What is a command and examples?
Which RAID Levels supported by LVM?
Explain how to use grep command to list find the records of a file containing 10 different strings?
What is sed awk grep?
What are the differences among a system call, a library function, and a unix command?
Hi All, Can you please let me know how to grep for a particular pattern in unix. I want to print the dates from the file exp.txt. the date pattern is DD:MM:YYYY, I just want to print all the dates from the file exp.txt.
8 Answers Concentrix, IBM, Symantec, TCS,
Give Command that will change the name of a directly from paypal to eBay
What are file commands?
How do you execute a UNIX command in the background?
What does grep v grep do?