Computer Science - Linux - Discussion
Discussion Forum : Linux - Section 1 (Q.No. 22)
22.
What command is not used to list the files chap01, chap02 and chap04?
Discussion:
8 comments Page 1 of 1.
Dharam said:
1 decade ago
We used ls chap* command.
Lalith kumar m said:
1 decade ago
ls chap0[124] will also work.
Surmeet said:
1 decade ago
1> ls chap* - will list all the files starting with "chap" and we want only chap01, chap02 & chap04.
2> ls -x chap0[124] - "x" list entries by lines instead of by columns.
But yes we can get output with ls chap0[124] as well. :).
2> ls -x chap0[124] - "x" list entries by lines instead of by columns.
But yes we can get output with ls chap0[124] as well. :).
Viswanatha said:
1 decade ago
This command also work.
#ls chap*.
chap01 chap02 chap04.
#ls chap*.
chap01 chap02 chap04.
Bhavika said:
1 decade ago
ls chap*
chap01 chap02 chap04
ls chap[124]
ls: chap[124]: No such file or directory
ls chap0[124]
chap01 chap02 chap04
ls -x chap0[124]
chap01 chap02 chap04
chap01 chap02 chap04
ls chap[124]
ls: chap[124]: No such file or directory
ls chap0[124]
chap01 chap02 chap04
ls -x chap0[124]
chap01 chap02 chap04
Sam said:
10 years ago
Its a wildcard.
Tejas said:
10 years ago
ls chap* will give any file starting with chap and we want chap 01, 02 and 03.
ls chap[124]: Will give error.
ls chap0[124]: Will get output chap 01, 02, qnd 03.
ls -x chap0[124]: Will get output by line instead of by columns.
ls chap[124]: Will give error.
ls chap0[124]: Will get output chap 01, 02, qnd 03.
ls -x chap0[124]: Will get output by line instead of by columns.
Buganda said:
8 years ago
According to me,
Is chap0[124]: is the answer.
Is -x chap0[124]: row(lines) and not columns.
Is chap0[124]: is the answer.
Is -x chap0[124]: row(lines) and not columns.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers