General :: Bash History And Keeping Track Of Current Working Directory?

Jun 8, 2010

I would like to keep track of not only what bash commands I used and when, but also where they were issued from, i.e. what was the current working directory when I issued "foobar" on a particular day and time. Can we ask bash history to keep track of working directories too? I have tried to get an idea of this reading the enormous "man bash", but I don't seem to have an answer yet either way.

View 11 Replies


Ubuntu :: Keeping Track Of Working Hours?

Sep 21, 2010

I would like to have a way to keep track of my working hours easily.

Insert arrival and finish times and have the difference in decimal. For example, if I start at 8:00 and finish at 9:30, 1.5 should be added.

I tried to do this with Calc but couldn't figure it out. I set one column to have entrance time, another one to have exit time and a third one with the difference("=B2-C2"). The result is in a timestamp format and not decimal. If I use another cell to say something like HOURS(D2) it rounds the number rather than give a decimal(would give 9 for 9:20:00).

EDIT: solved by doing =24*(B2-C2)

View 1 Replies View Related

General :: Configure Bash Prompt To Show Current / Parent Directory Only

Oct 15, 2010

I would like to modify Bash Prompt so it does not show the whole $PATH but just the current and parent directory. I am using Ubuntu.

View 3 Replies View Related

General :: Ubuntu: Track Application History In Gtkwm / Gdm?

Mar 3, 2010

Is there some way I can track all applications that were opened by a user during a gnome session in ubuntu?Do gdm/gtkwm keep a history of all applications that were opened in some log file?

View 2 Replies View Related

General :: Show The Current Local Working Directory In Ssh?

Feb 15, 2011

this is gonna be changed to another thread

View 1 Replies View Related

Programming :: History -c Is Not Working In Bash Script?

Mar 26, 2010

i wrote a script to run over a macintosh system


history -c

but the script not doing what i am trying to achieve.

View 1 Replies View Related

Fedora :: Software For Entering And Keeping Track Of Service Calls?

Feb 10, 2011

I am starting a small business for computer repair and was wondering if there is any software available for entering and keeping track of service calls. Right now I am using Kmymoney for keeping track of finances and it seems to be working out ok. I also use day planner to keep track of appointments. However, I haven't found anything to keep track of service calls. Currently, I am pretty much trying to adapt spreadsheets as a "get by" solution but its not that pretty.

View 9 Replies View Related

Fedora :: Bash Function Alias To Recursively Grep Current Directory?

Feb 14, 2011

This should be a simple thing to accomplish, but I can seem to figure it out. Essentially, I want to have a bash alias or function that will let me recursively grep the current directory. A while back I added this to my .bashrc:


alias rg="grep -r --exclude=*/.svn/* --exclude=*.swp"

This works fine, (and also ignores any svn and vim swp files), and I can call it like:


rg foo *

However, 99.999% of the time, I am only interested in searching in the current directory, so the "*" is a bit redundant. Also, I would say 5-10% of the time, I am typing faster than thinking and forget the "*", so grep just sits there trying to read from stdin. It's a pretty minor thing, but ideally I'd like to be able to just type:


rg foo

I've tried creating a function to handle this:


function rg(){
grep -r --exclude=*/.svn/* --exclude=*.swp $1 *

but it behaves exactly the same as the alias above. escaping the "*" with 's doesn't work, and neither does trying `pwd` (or even a hard-coded path) in its place.

View 2 Replies View Related

Ubuntu Networking :: Keeping Track Of Mobile Broadband Data Usage Across Computers?

Jun 6, 2010

the data usage information from the carrier is often several hours old and is accessed in some arcane ways (logging into their website, sending a specific SMS message at best). Here's my idea: single-session data usage is perfectly reported by ifconfig ppp0. The problem is, how tokeep track of previous sessions accumulate the numbers rollover to zero at specified date To be able to do this across computers means that one needs to store it on the modem/SIM card itself. (As a specially crafted SMS message, or a contact).

View 2 Replies View Related

General :: Sourcing Variables From ~/.bash.rc And Keeping Them Across Logouts

Sep 7, 2011

I've been writing a bunch of bash scripts to make possible non-interactive, secure, cron-based SVN checkouts with CollabNet's SVN client and GNOME Keyring Daemon (aka GKD) and one of the scripts was designed to start GKD, harvest its output, essentially a couple of environment variables, and export those variables in shell of a user the script is run as. All upon user login by sourcing a bash script in ~/.bashrc.The problem is that those environment variables will not be exported, because the script is being run in a sub-shell that exits upon it completion and environment variables get unset for good.Well, the question is how can those variables be set permanently, meaning they're exported and kept untouched even across login-logout sessions?

View 1 Replies View Related

General :: Keep Bash History Across Sessions?

Nov 17, 2010

I am working on a x86 target running fedora 9.

Whenever I reboot it, my history returns to some state, and I do not have commands I did in the sessions before the reboot.

What I have to change to have updated history I had before reboot?

View 2 Replies View Related

General :: How To Know Who Deleted Bash History?

Apr 8, 2011

In my organization, we have a centralized home directory for all users which gets mounted from all the machine where user logs in.Since any XYZ user can login to any of hundreds test machines and run 'sudo su - myusername', hence taking control of my home dir.How do I track who took control of my home dir and deleted its contents.

View 3 Replies View Related

General :: How To Copy Bash History

Feb 10, 2011

what command do i use to copy .bash_history to /tmp location?

View 9 Replies View Related

General :: How Is The "Current Working Directory Maintined"

May 25, 2010

I was wondering how the current working directory is maintained in linux. I assumed it would simply be an environment variable, but all attempts i've made to change directory by resetting variables shown by env have failed.Is this something that is maintained internally in the command prompt (bash in my case)?The background to this is I'm setting up a script to remotely run commands over ssh. Since separate commands will unfortunately require separate SSH connections, I need to maintain (save and reload) items such as environment variables and current working directory from one call of the script to the next.

View 4 Replies View Related

General :: How To Unlimited Bash/shell History

May 4, 2010

Is there a way to define an unlimited history in Bash ?

View 3 Replies View Related

General :: Get Bash History From Another Shell Instance

Aug 18, 2010

Possible Duplicate: Can history files be unified in bash? I have bash running in an ssh session, call this session A. I leave the office, go home, ssh to the same box, call this session B. From session B, I'd like to be able to look at the history of session A.

View 1 Replies View Related

General :: How To Get Bash Shell History Range

Oct 4, 2010

How can I get/filter history entries in a specific range?I have a large history file and frequently usehistory | grep somecommandNow, my memory is pretty bad and I also want to see what else I did around the time I entered the command.For now I do this:get match, say 4992 somecommand, then I do history | grep 49[0-9][0-9]this is usually good enough, but I would much rather do it more precisely, that is see commands from 4972 to 5012, that is 20 commands before and 20 after. I am wondering if there is an easier way? I suspect, a custom script is in order, but perhaps someone else has done something similar before.

View 2 Replies View Related

General :: Bash History, Delete Recurring Entries?

Jun 30, 2011

Is there a way to get the bash history to delete older entries that are identical to the new one?Say the bash history would look like this normally:

cd ~
ls -l


View 4 Replies View Related

General :: Delete Bash Terminal History Upto Certain No. Of Commands?

Jan 12, 2010

i want to delete some say 10 previous commands in bash shell!

View 3 Replies View Related

Ubuntu :: Print Current Working Directory In Title Of Xterm?

Jan 29, 2011

In any case what I'm asking it how can I set PWD into my xTerm title bar. I do NOT want pwd at my command prompt because it would make it too long.

View 2 Replies View Related

Programming :: Change Current Working Directory Through A Perl Script?

May 2, 2010

how can i actually switch to another directory with "chdir" in the we used to do is bash as:

$cat abc
cd Desktop/


View 1 Replies View Related

OpenSUSE :: Keeping Track Of Opensuse Specific Gnome 3 Fixes / Upgrades

Jul 9, 2011

Is there some blog, changelog, or place where i can track what issues get fixed in the opensuse gnome 3 implementation, or what features are bein added, what changes are bein made, etc.?For example, if there is some bug in opensuse with gnome 3, where can i read that it has been fixed in the dd/mm update, or that new feature xxxyyy was added in dd/mm update, etc.Im talking about issues, fixes, updates related to gnome 3 with opensuse. Not just opensuse with 2xgnome or kde.

View 1 Replies View Related

General :: Using Cp Properly - Copy A Directory Somewhere Else Into This Current Directory ?

May 13, 2011

I am in my current directory. I want to copy a directory somewhere else into this current directory. Lets say I want to take it from direc1/direc2 and the directory I want to take is called demo.


That is what it shows in the man pages, but when I do that, it says cp: no match

View 5 Replies View Related

General :: System Bash Shell Copy Previous Lines (not History) With Keyboard?

Jun 14, 2011

Is it possible to use the keyboard in order to select some text in the terminal windows that is not in the currently edited line? (for example, in order to copy part of previous command output).

View 3 Replies View Related

Ubuntu Installation :: Separate Hard Drive Keeping Current GRUB?

Mar 4, 2010

I'd like to install Lucid on a spare hard drive I have, so I can do my bit for testing it. I have a feeling that if I just burn the latest alpha .iso and install from that, it will replace my current GRUB, whereas I would prefer to simply add the Lucid install as an option in my current GRUB.

Of course I might be wrong, I just wanted to check before I went ahead with it. I was unable to find the info I needed via searching.

View 6 Replies View Related

Ubuntu :: Chroot Not Working: Cannot Run Command `/bin/bash': No Such File Or Directory

Mar 20, 2010

I'm trying to change the root directory to /tmp/somedir using chroot, but even using sudo or su-ing to root I get the message:


cannot run command `/bin/bash': No such file or directory

I tried copying /bin/bash to /tmp/somedir/, but the same error occurs. What's wrong with my chroot?

View 7 Replies View Related

General :: Check The Browsing History By Individual Users Web Surfing History By Their IP Addresses?

Jun 29, 2010

I am using squid proxy server for sharing Internet in my internal network. I would like to know that how can I check the browsing history by individual users web surfing history by their IP addresses?

View 1 Replies View Related

General :: Push/pop Current Directory?

Jan 11, 2011

With bash is there a way to push and pop the current working directory? I tried writing bash;cd dir; ./dostuff;exit; but the current directory is now dir.

View 2 Replies View Related

General :: How To Untar To Current Directory

Nov 13, 2010

1. is there a way to prohibit a program from writing data on the hdd?
2. can i have different icons on each gnome workspace and how?
3. how to untar to current directory?
"tar -xvvf blablah.tar.gz" does not work
"tar -xvvf blabla.tar.gz -C ./" does not work
in both cases, the files go into some strange random locations.
4. how can i change the way colors are displayed for different content in the xfce terminal? I used to have red for archives, blue for dirs etc. in kde, but lost all that after changing to gnome.

View 7 Replies View Related

General :: Bash Command History Update Before Execution Of Command

Jun 7, 2010

Bash's command history is great, especially it is useful when adding the history -a command to the COMMAND_PROMPT.However, I'm wondering if there is a way to log the commands to a file as soon as the Return key is pressed, e.g. before starting the command and not on completion of the command (using the COMMAND_PROMPT option would save the command once the prompt is there again).

I read about auditing programs like snoopy and session recorder like script but I thought they're already too complex for the simple question I have. I guess that deactivating that script logs all the output of the command would lead already in the right direction but isn't there a quicker way to solve that probelm?

View 1 Replies View Related

Copyrights 2005-15, All rights reserved