Check These Out
This could be added to .bashrc. Background: Linux usually saves history only on clean exit of shell. If shell ends unclean, history is lost. Also numerous terminals might confuse their history. With this variable set, history is immedeately written, accessible to all other open shells.
dir1 and all its subdirs and subdirs of subdirs ... but *no files*
will be copied to dir2 (not even symbolic links of files will be made).
To preserve ownerships & permissions:
$ cp -Rps dir1 dir2
Yes, you can do it with
$ rsync -a --include '*/' --exclude '*' /path/to/source /path/to/dest
too, but I didn't test if this can handle attributes correctly
(experiment rsync command yourself with --dry-run switch to avoid
harming your file system)
You must be in the parent directory of dir1 while executing
this command (place dir2 where you will), else soft links of
files in dir2 will be made. I couldn't find how to avoid this
"limitation" (yet). Playing with recursive unlink command loop
maybe?
PS. Bash will complain, but the job will be done.
numsum is part of of the num-utils package, which is available in some Linux distros and can also be downloaded at http://suso.suso.org/xulu/Num-utils. It contains about 10 different programs for dealing with numbers from the command line.
Obviously you can do a lot of things that the num-utils programs do in awk, sed, bash, perl scripts, but num-utils are there so that you don't have to remember the syntax for more complex operations and can just think: compute the sum, average, boundary numbers, etc.
you can use this command for mounting local directory to a remost directory..
The time zone names come from the tz database which is usually found at /usr/share/zoneinfo.
Read this before you down voting and comment that it is not working -> Wont work on latest versions ~75> since database file is locked and has to be decrypted. This is useful if you have an old hdd with a chrome installation and want to decrypt your old passwords fast.
Useful to e.g. keep an eye on several logfiles.
Record audio to an MP3 file via ALSA. Adjust -i argument according to arecord -l output.
it compresses the files and folders to stdout, secure copies it to the server's stdin and runs tar there to extract the input and output to whatever destination using -C. if you emit "-C /destination", it will extract it to the home folder of the user, much like `scp file user@server:`.
the "v" in the tar command can be removed for no verbosity.
Instead of typing "cd ../../.." you can type ".. 3". For extremely lazy typists, you can add this alias:
alias ...=".. 2" ....=".. 3"
- so now you can write just .... !!!
NB the .. function needs to be "source"d or included in your startup scripts, perhaps .bashrc.