DEV Community

fredlag
fredlag

Posted on

linux command tips

Hi all, my second post on dev not an original post but i will describe here what's linux command i have used last week.

CTRL+r command

This command help me a lot. With this command i can search in my past command. very usfull when you always make the same command again and again.

!! command

I used this command to Replay the last command. Exemple : nano /var/log/syslog (error because non sudo)
Juste type sudo !! and the command open directly the syslog file.

|Echo$? command

With that i can see the return of the program

Cpu burn

If you want to test a program with full cpu

dd if=/dev/zero of=/dev/null

fullcpu() { dd if=/dev/zero of=/dev/null | dd if=/dev/zero of=/dev/null | dd if=/dev/zero of=/dev/null | dd if=/dev/zero of=/dev/null & }; fullcpu; read; killall dd

Number of open ssh connection

sudo netstat -tulpn | grep LISTEN

Heroku

This site is built on Heroku

Join the ranks of developers at Salesforce, Airbase, DEV, and more who deploy their mission critical applications on Heroku. Sign up today and launch your first app!

Get Started

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay