- Check if the command can be executed by some user?
> su -s /bin/bash <your_user_to_test>
This command will give you the shell with same privileges as the user you want to test the command.
then you can type the command that you want to test and check. - Read a file inside the tar ball,
- list from the inner tar would be,
- see the content of the file inside the inner tar is,
tar -xOf outer.tar.gz path/to/inner.tar | tar -xOf - inner/some_file.txt | less
Find out the path of the embedded archive file that we wish to list or see:
tar -tzf outer.tar.gz | grep tar
Assume the ouput is `path/to/inner.tar`.
then the command to,
tar -xOf outer.tar.gz path/to/inner.tar | tar -tf -
3. To print all the words, containing the given word,
grep -E 'rust|rs$' /usr/share/dict/words | perl -MList::Util=shuffle -e 'print shuffle(<STDIN>);' | less
note:- in this change the word rust to whatever you want to search
No comments:
Post a Comment