
Terminal - Commands using cut - 407 results
curl -k https://Username:Password@api.del.icio.us/v1/posts/all?red=api | xml2| \grep '@href' | cut -d\= -f 2- | sort | uniq | linkchecker -r0 --stdin --complete -v -t 50 -F blacklist
This is sample output - yours may be different.
1 http://www.jokosher.org/
1 http://www.learnopenoffice.org/calccontents.htm
1 http://ubcd4win.com/forum/index.php?showtopic=9630
1 http://212.182.0.171/dwww/
1 http://www.smarthomeforum.com/start/default.asp
1 http://www.sjrcc.edu/
1 http://curvedns.on2it.net/docs
1 http://www.smarthomeforum.com/
This commands queries the delicious api then runs the xml through xml2, grabs the urls cuts out the first two columns, passes through uniq to remove duplicates if any, and then goes into linkchecker who checks the links. the links go the blacklist in ~/.linkchecker/blacklist. please see the manual pages for further info peeps. I took me a few days to figure this one out. I how you enjoy it. Also don't run these api more then once a few seconds you can get banned by delicious see their site for info. ~updated for no recursive
ifconfig -a | awk '/Bcast/{print $2}' | cut -c 5-19
This is sample output - yours may be different.
ifconfig -a | awk '/Bcast/{print $2}' | cut -c 5-19
This is sample output - yours may be different.
cut -d',' -f6 file.csv | sort | uniq
This is sample output - yours may be different.
for i in $(objdump -d binary -M intel |grep "^ " |cut -f2); do echo -n '\x'$i; done;echo
This is sample output - yours may be different.
\x31\xc0\x31\xdb\x31\xd2\xb0\x04\xb3\x01\x68\x65\x72\x65\x0a\x68\x48\x69\x54\x68\x89\xe1\xb2\x08\xcd\x80\x31\xdb\xb0\x01\xcd\x80
Anyone can make the command smaller & easier? :)
for a in $(seq 5 8); do cat twit.txt | cut -d " " -f$a | grep "^@" | sort -u; done > followlst.txt
This is sample output - yours may be different.
Go to "https://twitter.com/search/realtime?q=%23TeamFollowBack&src=hash" and then copy al the text on the page. If you scroll down the page will be bigger. Then put al the text in a text file called twit.txt
If you follow the user there is a high probability the users give you follow back.
To follow all the users you can use an iMacros script.
grep -Po '^sub (\w+)' file.pm | cut -d' ' -f2
This is sample output - yours may be different.
routine_alpha
routine_bravo
routine_charlie
instead of printing the whole line, print just the capture matched, but with the "cut" pipe :( I'm so sad with grep.
nmap -sP 192.168.0.* | grep Host | tr "(" ")" | cut -d\) -f2
This is sample output - yours may be different.
sudo ifconfig wlan0 | grep inet | awk 'NR==1 {print $2}' | cut -c 6-
This is sample output - yours may be different.
On wired connections set 'eth0' instead of 'wlan0'
while true; do (date | tr "\n" ";") && ping -q -c 1 www.google.com|tail -1|cut -d/ -f5 ;sleep 1; done >> uptime.csv
This is sample output - yours may be different.
Mer 6 f?v 2013 22:58:23 CET;37.756
Mer 6 f?v 2013 22:58:24 CET;36.194
Mer 6 f?v 2013 22:58:25 CET;28.422
Mer 6 f?v 2013 22:58:26 CET;38.456
Mer 6 f?v 2013 22:58:27 CET;29.385
Mer 6 f?v 2013 22:58:28 CET;38.182
Mer 6 f?v 2013 22:58:29 CET;27.605
Used in OS X.
tr "\n" ";"
may be replaced by
echo ";"
with linux versions of date.
I reused
ping -q -c 1 www.google.com|tail -1|cut -d/ -f5
dpkg-query -Wf '${Package}\n' | xargs dpkg --status | sed '/^Conffiles:/,/^Description:/!d;//d' | awk '{print $2 " " $1}' | md5sum -c 2>/dev/null | grep FAILED$ | cut -f1 -d':'
This is sample output - yours may be different.
$ dpkg-query -Wf '${Package}\n' | xargs dpkg --status | sed '/^Conffiles:/,/^Description:/!d;//d' | awk '{print $2 " " $1}' | md5sum -c 2>/dev/null | grep FAILED$ | cut -f1 -d':'
/etc/apt-fast.conf
/etc/xdg/autostart/at-spi-dbus-bus.desktop
/etc/bash.bashrc
/etc/chromium-browser/default
/etc/gnome/defaults.list
/etc/fuse.conf
/etc/xdg/autostart/gsettings-data-convert.desktop
/etc/xdg/autostart/bluetooth-applet-unity.desktop
/etc/xdg/autostart/bluetooth-applet.desktop
/etc/xdg/autostart/gnome-keyring-gpg.desktop
/etc/xdg/autostart/gnome-keyring-ssh.desktop
/etc/xdg/autostart/gnome-keyring-secrets.desktop
/etc/xdg/autostart/gnome-keyring-pkcs11.desktop
/etc/init.d/networking
/etc/dhcp/dhclient.conf
/etc/xdg/autostart/jockey-gtk.desktop
/etc/logrotate.conf
/etc/mdm/mdm.conf
/etc/mime.types
/etc/modprobe.d/blacklist.conf
/etc/xdg/autostart/nemo-autostart.desktop
/etc/NetworkManager/NetworkManager.conf
/etc/xdg/autostart/polkit-gnome-authentication-agent-1.desktop
/etc/sysctl.conf
/etc/xdg/autostart/pulseaudio.desktop
/etc/sudoers
/etc/xdg/autostart/print-applet.desktop
This functionality seems to be missing from commands like dpkg. Ideally, I want to duplicate the behavior of rpm --verify, but it seems difficult to do this in one relatively short command pipeline.
largest() { dir=${1:-"./"}; count=${2:-"10"}; echo "Getting top $count largest files in $dir"; du -sx "$dir/"* | sort -nk 1 | tail -n $count | cut -f2 | xargs -I file du -shx file; }
This is sample output - yours may be different.
$ largest
Getting top 10 largest files in ./
711M ./Havoc.2005.UNRATED.DVDRip.XviD-PuRE
719M ./Lincoln 2012
799M ./[ www.UsaBit.com ] - Here Comes the Boom (2012) BluRay 720p 800MB Ganool.mkv
950M ./Watchmen
1.2G ./Sucker Punch
1.4G ./The Buried Life
1.4G ./Stop-Loss
2.5G ./Django Unchained 2012 DVDSCR X264 AAC-P2P
14G ./Justified Season 2 Complete 720p
15G ./Justified Season 1 Completed 720p
You can simply run "largest", and list the top 10 files/directories in ./, or you can pass two parameters, the first being the directory, the 2nd being the limit of files to display.
Best off putting this in your bashrc or bash_profile file
FILE='mp3.list';LNNO=`wc -l $FILE|cut -d' ' -f 1`;LIST=( `cat $FILE` );for((;;)) do SEED=$((RANDOM % $LNNO));RNNO=$(python -c "print int('`openssl rand -rand ${LIST[$SEED]} 8 -hex 2>/dev/null`', 16) % $LNNO");mplayer ${LIST[$RNNO]};sleep 2s; done
This is sample output - yours may be different.
apt-get --ignore-hold --allow-unauthenticated -s dist-upgrade | grep ^Inst | cut -d ' ' -f2
This is sample output - yours may be different.
linux-image-3.2.0-35-virtual
gpgv
gnupg
man-db
linux-image-virtual
Taken from apticron and modified.
svn diff . -r43:HEAD --summarize | cut -c9-99999 | cpio -pvdmu ~/destination
This is sample output - yours may be different.
/home/me/destination/lib/model/ActivityTable.class.php
/home/me/destination/lib/model/ScheduleTable.class.php
/home/me/destination/lib/form/Activity.class.php
/home/me/destination/lib/form/Schedule.class.php
Get the list of changed files between revision 43 and HEAD revision: svn diff . -r43:HEAD --summarize
Strip extra 8 characters from every line: cut -c9-99999
Copy the listed files to home/me/destination: cpio -pvdmu ~/destination
Make a plain copy (-p), list files being copied (-v), create needed directories (-d), preserve modification time (-m), overwrite unconditionally (-u)
/sbin/ifconfig eth0 | grep 'inet addr:' | cut -d: -f2 | awk '{ print $1}'
This is sample output - yours may be different.
This is sample output - yours may be different.
find . -type f -printf "%T@ %Tc %p\n" |sort -n |cut -d' ' -f2- |tail -n20
This is sample output - yours may be different.
ifconfig eth0 | grep HW | cut -d " " -f 11
This is sample output - yours may be different.
tail -1000 `ls -ltr /var/log/CF* |tail -1|awk '{print $9}'`|cut -d "," -f 17|sort|uniq -c |sort -k2
This is sample output - yours may be different.
count & sort one field of the log files , such as nginx/apache access log files .
dig @resolver1.opendns.com myip.opendns.com | grep ^myip.opendns.com | tr '\t' : | cut -d: -f5
This is sample output - yours may be different.
cd ~/.msf4/loot && cat *mscache* | cut -d '"' -f 2,4 | sed s/\"/\:/g | tr -cd '\11\12\40-\176' | grep -v Username | cut -d : -f 1,2 | awk -F':' '{print $2,$1}' | sed 's/ /:/g' > final.dcc.hash
This is sample output - yours may be different.
pacman -Qi | grep 'Name\|Size\|Description' | cut -d: -f2 | paste - - - | awk -F'\t' '{ print $2, "\t", $1, "\t", $3 }' | sort -rn
This is sample output - yours may be different.
253888.00 KiB wine A compatibility layer for running Windows programs
241743.00 KiB libreoffice-common common files for LibreOffice - a productivity suite that is compatible with other major office suites
121212.00 KiB openjdk6 Free Java environment based on OpenJDK 6.0 with IcedTea6 replacing binary plugs.
108232.00 KiB chromium The open-source project behind Google Chrome, an attempt at creating a safer, faster, and more stable browser
This, like the other commands listed here, displays installed arch packages. Unlike the other ones this also displays the short description so you can see what that package does without having to go to google. It also shows the largest packages on top. You can optionally pipe this through head to display an arbitrary number of the largest packages installed (e.g. ... | head -30 # for the largest 30 packages installed)
nmap -sP 192.168.1.0/24 | grep "Nmap scan report for"| cut -d' ' -f 5 > ips.txt
This is sample output - yours may be different.
vim $(grep [REGULAR_EXPRESSION] -R * | cut -d":" -f1 | uniq)
This is sample output - yours may be different.