Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux etc. tips #27

Open
seyyah opened this issue Apr 6, 2017 · 5 comments
Open

Linux etc. tips #27

seyyah opened this issue Apr 6, 2017 · 5 comments

Comments

@seyyah
Copy link
Owner

seyyah commented Apr 6, 2017

MC

$ mc
Error opening terminal: xterm-256color.

$ TERM=xterm mc

Kaynak: https://unix.stackexchange.com/questions/385834/error-opening-terminal-xterm-256color

WATCH

$ watch -n1 -c "ps -ax | grep raspivid"

WGET

$ wget --limit-rate=200k --no-clobber --convert-links --random-wait
  -r -p -E -e robots=off -U mozilla http://www.kossboss.com

Coding

gem install serve
serve 9000

VEYA

python3 -m http.server 80

Kaynak: https://askubuntu.com/questions/377389/how-to-easily-start-a-webserver-in-any-folder

Network

DNS

dig seyyah.me +nostats +nocomments +nocmd

IP

Locale IP from browser (ör. Porteus için)

Port

  • Built-in
netstat -atnp
nc -zv 176.101.133.23 8443
  • How to scan local network for SSH-able computers?
nmap -sS -p 22 192.168.1.0/24
  • Makinede sshd çalışıyor mu? Port açık mı?
$ sudo netstat -plant | grep :22
tcp  0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1467/sshd       
tcp  0 0 192.168.1.58:22 192.168.1.58:57242 ESTABLISHED 1487/sshd: pi [priv
tcp6 0 0 :::22 :::* LISTEN 1467/sshd 

-Easily see what's happening on your computer's ports https://github.com/caarlos0/ports

$ ports ls
$ port show 4000
$ port kill 4000

Genel

$ inxi -SNxz
$ ifconfig -a
$ sudo uname -a -r

DDRESCUE

ddrescue -D --force debian-8.8.0-amd64-i386-netinst.iso /dev/mmcblk0

DMESG

$ dmesg -wH # ~ tail -f 

MBR Sil

After burning the kiosk on usb stick the Windows operating system shows only XX MB as available size. How can i recover my usb key?
Kiosk uses hybrid ISO images which installs isolinux bootloader to the Master Boot Record of the drive. Its enough to delete MBR content and partition table to make the drive fully usable again. Windows users should follow this guide. Linux users can use 'dd' command to wipe the MBR of the usb stick:

dd if=/dev/zero of=/dev/sdX bs=1M count=10

kill

Kill the process,

$ pkill -15 -f process

Change defaul editor

$ sudo update-alternatives --config editor

$ sudo select-editor # in mc

Curl image/etc. download,

$ curl -o app/assets/images/rails.png -OL railstutorial.org/rails.png

Sublime

Multiple line editing,
image

Clock

ntpdate pool.ntp.org
hwclock --systohc --localtime

hwclock
date

Kaynak: https://docs.slackware.com/howtos:hardware:syncing_hardware_clock_and_system_local_time

FIND

Dosya ve boyutları,

find . -type f -name "*.ext" -exec ls -lh {} \;

Recursive + file list > csv,

find . -printf "%04k kB;;%p\n" > t.csv

Driver

How to list all loadable kernel modules?

find /lib/modules/$(uname -r) -type f -name \*.ko
@seyyah
Copy link
Owner Author

seyyah commented Oct 5, 2017

mount -w /dev/mmcblk0p1 p1

@seyyah
Copy link
Owner Author

seyyah commented Jun 19, 2018

Github

Get a GitHub user's email.

npm install --global github-email
github-email seyyah

📋 Kaynaklar

  1. https://github.com/paulirish/github-email

@seyyah
Copy link
Owner Author

seyyah commented Aug 4, 2018

FFMPEG

ffmpeg-concat -t circleopen -d 750 -o huzzah.mp4 0.mp4 1.mp4 2.mp4

📋 Kaynaklar

  1. https://github.com/transitive-bullshit/ffmpeg-concat

@seyyah
Copy link
Owner Author

seyyah commented Oct 11, 2018

@seyyah
Copy link
Owner Author

seyyah commented Feb 7, 2020

CAL, NCAL

$ ncal -C -m 6
    Haziran 2020      
Pz Sa Çr Pr Cu Ct Pa  
 1  2  3  4  5  6  7  
 8  9 10 11 12 13 14  
15 16 17 18 19 20 21  
22 23 24 25 26 27 28  
29 30

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant