Skip to content

Instantly share code, notes, and snippets.

View ilacorda's full-sized avatar
🏠
Working from home

ilacorda

🏠
Working from home
View GitHub Profile
@ilacorda
ilacorda / gist:11301660
Created April 25, 2014 20:11
To find out which version of Windows you are running,
wmic os get osarchitecture
@ilacorda
ilacorda / gist:bb7e9873c929d2496867
Created May 21, 2014 16:30
Metacharacters example - search for a specific letter followed by another in the filename
grep -e 'e[a]' filename.log
@ilacorda
ilacorda / gist:699985572232b8363e1e
Created May 22, 2014 16:49
grep any digits between 1 to 9 from a file
grep '[1-9]$ file.text
@ilacorda
ilacorda / gist:6e59ba78e6cbdb63d114
Created August 27, 2014 10:01
Find all files modified in the past hour
find / -mmin -60
@ilacorda
ilacorda / gist:528d5c9aa964a05392b1
Created September 9, 2014 17:05
Count all the files in a tar.gz
tar -tzf filename.tar.gz | wc –l
@ilacorda
ilacorda / scp-command
Created October 22, 2014 13:14
copying a set of tar.gz files from a server into another server's directory
cd /folder/folder/folder
scp *.tar.gz username@hostname:/folder/folder/folder
@ilacorda
ilacorda / gist:a99735b0b59c2560ea7a
Created October 23, 2014 12:42
Count all files in a directory that have no extension
find . -type f -name "*" | wc -l
@ilacorda
ilacorda / gist:3cf7ba974b4d609ebdc3
Created October 23, 2014 13:53
Find all files without extension and delete them
find . -name "*" -type f -delete
@ilacorda
ilacorda / gist:7e2c5daea7d0213b6739
Created October 23, 2014 13:54
Find all files with a specific extension and list them
find . -name "*.text" -type f
@ilacorda
ilacorda / gist:21a3eefc2157fabfbdbb
Last active August 29, 2015 14:08
copy the first 100 files into another directory
$find . -maxdepth 1 -type f | head -100 | xargs cp -t $destdir