-1

I am writing this code in my jupyter notebook but it is not working.

!tail -n 10 Customers.csv

The error is

'tail' is not recognized as an internal or external command,
operable program or batch file.

I am also attaching an image for the reference. enter image description here

3
  • Are you sure linux is related? Windows never heard of tail Commented Apr 23, 2022 at 10:42
  • Yes, you aren't using Linux as @Roi is pointing out. Exclamation point doesn't mean it sends it to a linux shell necessarily. Be default it just sends the command to run to your system's main command line basis and on your Windows machine's current set-up that isn't Linux. It is probably DOS given what it is showing. I don't know what the dos equivalent of tail is. If you want to switch to using Linux then probably follow what Daniel is suggesting or search around for advice along those lines specifying what version of Windows you are using, installing with Anaconda, etc. Commented Apr 23, 2022 at 17:21
  • read and apply my answer it is possible to run linux command under windows without wsl. Commented Apr 27, 2022 at 16:32

2 Answers 2

0

I installed sed, awk, grep, tar, wget exc.. from here: http://gnuwin32.sourceforge.net/packages.html . and I installed tail, chmod, mkdir exc.. commands from here: http://gnuwin32.sourceforge.net/packages/coreutils.htm I tested, commands are running in jupyter notebook under windows OS but there is a mini problem: For example After running the sed command, it leaves a file with a name starting with sed, ( it is like sed_fdgdfgdf ) it is necessary to delete these files. tail in cmd

NOTE: Download complete package and run *.exe file enter image description here

Sign up to request clarification or add additional context in comments.

Comments

-1

This post recommends installing WSL or Git Bash.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.