find / -xdev -samefile file1 Second Method $ ls -li file1 2655341 -rw-r--r-- 3 peter peter 0 2008-09-02 19:09 file1 find /home -xdev -inum 2655341
shell/
#!/usr/bin/perl # wgrep.pl - windowed grep utility #!/usr/bin/perl # wgrep.pl - windowed grep utility use strict; use IO::File; use IO::Handle; my ($before,$after,$show_stars,$show…
0: Which process has port 22 open? #!/usr/bin/ksh # # PCP (PID con Port) # v1.10 08/10/2010 Sam Nelson sam @ unix.ms # # If you have a Solaris 8, 9 or 10 box and you can't # instal…
perl -e 'use POSIX qw(strftime); print strftime "%a %b %e %H:%M:%S %Y",localtime(time()- 3600*24*2);'
#mysql alias mysql="mysql –pager='less -niSFX'"
$ for drive in 0 1 2 3 4 5 6 7 > do > mt -f /dev/rmt/$drive status > done
fping -a -q -g 192.168.0.0/24
You can search forward as well. From the bash info manual, "8.2.5 Searching for Commands in the History": To search backward in the history for a particular string, type C-r. Typin…
#!/usr/bin/expect -f # telnet into tor and get clean path using expect spawn telnet 127.0.0.1 9051 expect "Escape character is '^]'." send "AUTHENTICATE\r" expect "250 OK" send "si…
Grep will remove all comments and sed will remove all empty lines # grep -v "^#" /etc/squid/squid.conf | sed -e '/^$/d' Same with sed # cat /etc/squid/squid.conf | sed '/ *#/d; /^…