1,133 reputation
419
bio website initialprogramload.blogspot.c…
location Cape Town, South Africa
age 41
visits member for 1 years, 5 months
seen yesterday

Clickety click noise generator


1d
awarded  Nice Answer
1d
comment Why isn't there any shell command to create files?
It is worth noting that there does exist commands specifically intended for making files. @terdon mentioned mktemp. Solaris also have mkfile which allows you to specify a size and whether to zero or create a sparse file. docs.oracle.com/cd/E23823_01/html/816-5166/mkfile-1m.html
1d
comment Why isn't there any shell command to create files?
I disagree that creating empty files have no use. In some scripts I first check that a file does not have stale/invalid content, and then append to the file. Depending on the existing file I may truncate the existing file. Otherwise if the file doesn't exist, since I will be appending to it, I create a blank file in advance. The alternative would be to explicitly override the user's clobber settings, which I avoid doing as far as possible.
Apr
15
comment How to awk printf additional string with backslash
In fact my version of awk feels it necessary to emit a warning to tell me that!
Apr
15
comment How to awk printf additional string with backslash
You do not need to escape the / between double-quotes.
Apr
15
answered How to subtract rows (lines) with AWK
Apr
15
comment Is it possible to generate a separate file list when creating a tarball?
What makes --verbose a not-so-good option? Did you consider --index-file=FILE
Apr
10
comment Most innocuous package to install to test yum?
Why not just test using something that you actually need? Then you do not waste bandwidth, and any side-effects or implications are things you would have to live with in any case.
Apr
8
revised How to tell which file is original if hard link is created
Slight re-wording and re-organization of contents to accentuate the intended meaning.
Apr
8
comment How to configure for an Authenticating Proxy Server
This has since moved to GitHub, gained more modules, and is slowly but surely approaching usable form. Daring and adventurous types may find this useful: github.com/Tahaan/proxymanager
Apr
8
answered Dynamically changing the proxy server for all outgoing traffic
Apr
8
comment How to set up a “child” proxy that doesn't need a “parent” proxy
I use ProxyManager for Exactly This Purpose. It is a script that will enable/disable proxy settings in a wide variety of applications. github.com/Tahaan/proxymanager - works well enough on Ubuntu-like distros, including Kubuntu. May need some tweaking on other distros though.
Apr
2
revised How to tell which file is original if hard link is created
Final take-home point added:
Apr
2
answered How to tell which file is original if hard link is created
Apr
2
comment How to tell which file is original if hard link is created
What are you trying to achieve? What are you trying to achieve? There is no "original" as such. A file is an inode containing meta data and a collection of blocks containing data. A directory can contain a link to the file, and this link is the file name and the inode number. You can create any number of links to a file. Files may never have less than one link.
Mar
26
comment The proper way to turn off an external sata encolsure?
Try for every device: smartctl -s standby,now device and/or what is documented here: met.reading.ac.uk/~swsellis/tech/linux/linux_scsi_hotswap.html To remove a SCSI device from the driver.
Mar
26
comment At what point did the /home directory appear?
Another reason (for using /home) was to separate it out from /usr in order to be able to Automount the user home dirs.
Mar
26
comment Why are there so many different ways to measure disk usage?
And the output from ls includes un-allocated (sparce file) blocks, but excludes allocated space at the end of the last block. du counts the allocated space in the final block twice when that block is shared by two files. Disk space is also reserved for bad-block management and SMART data, as well as for the partition table itself. File systems often doesn't start at the start of the partition because it can sometimes overlap boot loader code.
Mar
19
comment The ls command is not working for a directory with a huge number of files
Minimum file name length (for 5 million files) is 3 characters (maybe 4 if you stick to more common characters) plus delimiters = 4 chars per file, i.e 20 MB of command arguments. That is well over the common 2MB expanded command line length. Exec (and even the builtins) would baulk.
Mar
19
comment The ls command is not working for a directory with a huge number of files
Come on! It's already got 5 million files in there. Put your custom "ls" program into some other directory.