Text

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

Saturday, January 4, 2020

Unix Notes

netstat -i
shows what network are connected

tail /var/adm/syslog
shows tail end of specified file.

head <filename>
shows head of a file

man CC
online manual, topic CC

ls
List. like dir /w

ls -l
list with details

ls -l |more
page the output

du
Disk utilization.  Like a tree.

mv <old> <new>
move.  rename.

pwd
print working directory

$HOME
holds home directory

find / -name socket -print
find topic socket, print to screen

cc <name.cxx> <name2.cxx>
ANSI C compile

CC <name.cxx> -g
C++ compile with debugger info

ps -e
list all running processes with process ids

ps -e |grep swi
list all running processes starting with swi

kill <proc id>
stop a running process

cmod 777 <filename>
gives permission to all (wildcards allowed)

rm <filename>
removes file, wildcards allowed

cat <filename>
Dumps file contents to screen.

cat *.csv | filename
Concatenates all csv files in current folder to a single file.

cat *.csv | hdfs dfs -put - target filename
Concatenates all csv files in current folder to a file within Hadoop distributed file system (starting from edge node).

wc -l *.csv
Word Count for all CSV files in current folder.