Quote:
Originally Posted by imrrann
>> LS
File1 File2
>> Secure File1
Password:*****
>> LS
File2
>> LS -secure
password:*****
File1 File2
|
Well, the filtering (which I think is what you're asking about) is super-easy. Have the
secure command write the list of "secured" filenames to a hidden file, possibly ~/.ls_secured. Then have
LS (or your implementation of
ls) read that file.
This is blatant homework, so no further security measures should be necessary.
BTW, your other threads indicated that you're having trouble writing code to actually list files. You've posted conflicting information about your implementation language:
Quote:
Originally Posted by imrrann
I have been giving the task of shell scripting in C++ for implementation of Secure command in my shell.
|
Quote:
Originally Posted by imrrann
I would like to compile a C program in linux
|
Therefore, here are links to the best practices for both C and C++.
A lot of C++ programmers would prefer the first solution though
.
Yes, you actually need to learn the relevant parts of one of these two libraries.
Now don't
ever claim that this thread "contained no useful information", because you've just been given everything you need to get this done.