strings command gives : No such file error

I'm a newbie user of Ubuntu. I am using Virtualbox to use Ubuntu. I use a shared folder called 'projects'. In Ubuntu, I go to a folder called Fibo and right-click on it -> Open Terminal Here and write strings test

test is .c file inside 'Fibo' folder. Even though it seems I do correctly, it gives: strings: 'test': No such file error. Any idea what causes this? Thanks in advance

Edit When I try strings test.c it shows codes inside test.c file.

1 Answer

From man strings:

NAME strings - print the strings of printable characters in files.

A C source code file consists entirely of printable characters, so strings test.c prints it verbatim. On the other hand, there is no file in the directory named simply test (without the .c suffix).

Perhaps you expected there to be an executable file named test, built from the source code file test.c? If so, you can try to build it with

make test

or

gcc -o test test.c

If that succeeds, try strings test again.

1

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like