InterviewSolution
Saved Bookmarks
| 1. |
Solve : need help lsiting files? |
|
Answer» i have a folder called 'lab2b' which contains a subfolder called 'lab2b_sub' Homework question? it lists group.copy, passwd, passwd.copy doesnt not list myProfile or lab2b_sub.copy hm.. also when i tried "ls lab2b_sub/[!m]*" its lists the 4 files and excludes myProfile, howerver, the list is not one line like a normal list looks like. but it looks something like this: group.copy passwd passwd.copy lab2b_sub.copy (my command line) --- is that wrong? or is that correct.. my guess is that lab2b_sub is on a separate line because it is a directory and the other 3 are files?Yup. Is this an assignment? Are you learning about shell expansion? How about using grep/awk?there's another way, check if you have --hide OPTION of your ls ? something like this Code: [Select]ls -l --hide=myProfile lab2/lab2_sub/* That option is from the GNU Coreutils - which O/S, distro and shell are you using, ghostdog?Quote That option is from the GNU Coreutils - which O/S, distro and shell are you using, ghostdog? hi there i am using Fedora core 5. i am just reading my ls man page and found this option...TESTED it out and seems to work... As if by magic, that command line option has suddenly appeared in my version of ls... |
|