Txt

Byte sized tech know-how.

  • Home
  • About

Tag Archives: head

02 Jul

Create Random Password

Use this command to create a random password


< /dev/urandom tr -dc A-Za-z0-9_ | head -c8

Also see…

admin Posted in Command Line, Linux command, head, Linux, password, random, shell, shellfu, tr, urandom Leave a comment
13 Apr

First Two Lines

View first two lines of a file


head -2 file

tail -2 file # for last 2 lines
admin Posted in Command Line, Linux command, head, line, Linux, tail Leave a comment
14 Dec

Pid Command

Create a command that will return the pid of the given command string..


#!/bin/sh
ps aux|grep 1|head -n1|awk '{print2}'
admin Posted in Command Line, Linux command, grep, head, Linux, pid, process, ps, sed Leave a comment

Post navigation

Categories

  • Code
  • Command Line
  • Configuration
  • CSS
  • HTML
  • internet
  • JavaScript
  • Linux
  • Mobile
  • Perl
  • PHP
  • Python
  • Ruby
  • Uncategorized

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
Fruitful theme by fruitfulcode Powered by: WordPress
↑