chris clarke
software development that works…or something
GNUs Not U 3
February 17, 2007 on 8:18 pm | In Unix |Stop a command from exiting after you logout:
nohup monkeys.sh
Convert html so it can be displayed on a web page:
cat index.html | perl -pe 's/</</g; s/>/>/g'
See the strings in a binary file:
strings /bin/rm
Show line numbers of a file:
nl monkeys.c
See a particular line in a file:
cat buildOutput.txt | nl | awk '$1==5 {print; }'
Concatenate files horizontally:
paste times dates people
View and save output at the same time:
ls | tee filesInthisDirectory.txt
Say yes to everything:
yes | rm -i *.txt
Send a message to everyone:
echo 'all your base are belong to us' | wall
See a list of processes every 5 seconds:
watch -n5 "ps aux"
Sort by the second column of a file:
cat file.txt | sort -k2
Delete a bunch of files matching a regex:
find . -name "*.svn" -exec rm -rf '{}' \; -print
Reverse a string:
echo "Never odd or even" | rev
No Comments yet »
RSS feed for comments on this post. TrackBack URI
Leave a comment
GNUs Not U 3
February 17, 2007 on 8:18 pm | In Unix |Stop a command from exiting after you logout:
nohup monkeys.sh
Convert html so it can be displayed on a web page:
cat index.html | perl -pe 's/</</g; s/>/>/g'
See the strings in a binary file:
strings /bin/rm
Show line numbers of a file:
nl monkeys.c
See a particular line in a file:
cat buildOutput.txt | nl | awk '$1==5 {print; }'
Concatenate files horizontally:
paste times dates people
View and save output at the same time:
ls | tee filesInthisDirectory.txt
Say yes to everything:
yes | rm -i *.txt
Send a message to everyone:
echo 'all your base are belong to us' | wall
See a list of processes every 5 seconds:
watch -n5 "ps aux"
Sort by the second column of a file:
cat file.txt | sort -k2
Delete a bunch of files matching a regex:
find . -name "*.svn" -exec rm -rf '{}' \; -print
Reverse a string:
echo "Never odd or even" | rev
No Comments yet »
RSS feed for comments on this post. TrackBack URI
Leave a comment
Powered by Cheese.
RSS Entries Feed.
RSS Comments Feed
^Top^