Search Results

Search: Posts Made By: drew77
Forum: Ubuntu 04-12-2019
10,887
Posted By Corona688
Files with spaces shouldn't cause problems unless...
Files with spaces shouldn't cause problems unless zip does something weird with them, shell globbing always matches whole, unsplit filenames.
Forum: Ubuntu 04-10-2019
11,385
Posted By wisecracker
Hi drew77... GREEN='\033[0;32m' ...
Hi drew77...
GREEN='\033[0;32m'
RED='\033[0;31m'
WHITE='\033[0;37m'
RESET='\033[0m'
Forum: Ubuntu 04-06-2019
4,958
Posted By MadeInGermany
Open the file with > and previous contents is...
Open the file with > and previous contents is overwritten.
BTW if you permanently open it with exec then you can do this
exec 2> /tmp/systemd_suspend_test_err.txt
date "+%I:%M:%S_%D" >&2
Note...
Forum: Ubuntu 04-06-2019
4,958
Posted By jim mcnamara
I do not know a good answer, I am guessing: ...
I do not know a good answer, I am guessing:

>> uses an existing file if one is available, it does not clear out old data in the file like > does.

If the dates are precisely the same down to...
Forum: Ubuntu 04-04-2019
10,887
Posted By Corona688
Sorry, I don't see it. Could you link to where...
Sorry, I don't see it. Could you link to where you answer the question?

My final wild guess is there's some odd filename in there which zip is taking to be a commandline switch instead of a file....
Forum: Ubuntu 04-04-2019
10,887
Posted By Corona688
On a lark, try: echo zip -u...
On a lark, try:

echo zip -u Ubuntu_Documents.zip *.txt *.doc *.rtf *.html *.png *.pdf *.odt *.ods *.odg *.csv *.png *.xls On_Resume* Which will at least solve the question of whether it's being...
Forum: What is on Your Mind? 04-02-2019
1,818
Posted By Neo
Hey Wolf, Well, if here is one claim I can...
Hey Wolf,

Well, if here is one claim I can make, is that I am a long time and hands on expert in cybersecurity. I disagree with your advice to users.

Security is not as simple as you make it...
Forum: Ubuntu 04-02-2019
15,981
Posted By Don Cragun
I guess enquiring minds want to know... How...
I guess enquiring minds want to know...

How do you know that your script is running?

Exactly where did you add the above code in your script? (I.e., What does your complete script look like...
Forum: Ubuntu 04-02-2019
15,981
Posted By Don Cragun
Just for the fun of it, please change the...
Just for the fun of it, please change the following line in your script:
exec 2> /tmp/systemd_suspend_test_err.txtto:
exec 2>> /tmp/systemd_suspend_test_err.txt
date >&2
printf "$0 argument:...
Forum: Ubuntu 04-02-2019
15,981
Posted By Don Cragun
I'm not familiar with gxmessage, but from what we...
I'm not familiar with gxmessage, but from what we are seeing in the log, one might guess that some service it depends upon has already been shutdown before your script is called when the system is...
Forum: Ubuntu 04-02-2019
15,981
Posted By Don Cragun
Everything in /tmp is removed on reboot by...
Everything in /tmp is removed on reboot by default on some operating systems unless a local systems administrator decides to change that policy. I have no idea what Ubuntu does by default nor what...
Forum: Ubuntu 03-27-2019
12,948
Posted By apmcd47
My own tuppence worth on this: As this is...
My own tuppence worth on this:

As this is in the Ubuntu sub-forum, ps has a -b (size in bytes) option;
If you want the size of a file in bytes, surely the most accessible (and therefore most...
Forum: Ubuntu 03-24-2019
4,562
Posted By wisecracker
If you intend to use xinput then you will need to...
If you intend to use xinput then you will need to take a minimum of 2 readings for the mouse......
xinput query-state <your device name>
......which will give the results:
2 classes :...
Forum: Ubuntu 02-28-2019
4,568
Posted By Corona688
Use -j to junk the path element, i.e. zip -u -j...
Use -j to junk the path element, i.e. zip -u -j this.zip /etc/fstab and you need not run it from inside /etc any more.
Forum: Ubuntu 02-25-2019
4,032
Posted By Corona688
The part which does the exclusion is --exclude...
The part which does the exclusion is --exclude 'dir1/dir2/file3.txt' so you could try --exclude 'path/to/2019-02-25_11:04'
Forum: Ubuntu 02-26-2019
4,032
Posted By bakunin
Probably. Why don't you set up two test...
Probably. Why don't you set up two test directories and simply try it? It would be a matter of minutes to find out, no?

I hope this helps.

bakunin
Forum: Ubuntu 02-26-2019
4,032
Posted By stomp
See also in the manpage of rsync, especially...
See also in the manpage of rsync, especially under Exclude/Include Patterns: Linux Manpages Online - man.cx manual pages (https://man.cx/rsync#heading17)

You can specify the -v option(increase...
Forum: Ubuntu 02-26-2019
4,032
Posted By nezabudka
--include="[0-2]*" --- Post updated at...
--include="[0-2]*"


--- Post updated at 13:20 ---

There is only a pitfall.
/media/andy/MAXTOR_SDB1/Ubuntu_Mate_18.04/*
if there is an asterisk in the directory name, then the shell makes...
Forum: Ubuntu 02-25-2019
5,160
Posted By nezabudka
There is a tool that can determine the identity...
There is a tool that can determine the identity of files using the md5 sum.
apt install fdupes
Look at the listing
fdupes dir1/ dir2/
Interactive mode with a choice to remove
fdupes -d dir1/...
1
668
Posted By Neo
Hello! In case you forgot to read the forum...
Hello!

In case you forgot to read the forum rules (https://www.unix.com/misc.php?do=cfrules), here is quick copy.



Cheers.

The UNIX and Linux Forums
Forum: Programming 10-28-2018
3,670
Posted By Corona688
The C language, the C preprocessor, and the...
The C language, the C preprocessor, and the linker do not work that way.

Besides, altering what you stuff into a pair of double quotes doesn't move it into the code segment. It will be in the...
Forum: Programming 10-28-2018
3,670
Posted By wisecracker
You could try inline assembler inside your C code...
You could try inline assembler inside your C code using a simple short jump to a NOP and filling the gap with define bytes with the hex values of the string you want to display:
Pseudo-code......
1,369
Posted By rbatte1
Would something like this help:-touch -mt $(date...
Would something like this help:-touch -mt $(date +%Y%m%d0000) /tmp/start_of_today # Create a reference file with a timestamp starting at 00:00 today
find /etc /opt /tmp -type f...
1,369
Posted By rdrtx1
today=$(date +"%Y-%m-%d") for dir in /etc...
today=$(date +"%Y-%m-%d")

for dir in /etc /opt /tmp
do
find $dir -type f -mtime -1 2>/dev/null | while read file
do
cdate=$(stat -c %y "$file")
[[ ${cdate%% *} = $today ]]...
1,888
Posted By vgersh99
watch -n 0.2 "sensors -f | egrep...
watch -n 0.2 "sensors -f | egrep 'temp4|fan1'"
Showing results 1 to 25 of 44

 
All times are GMT -4. The time now is 06:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy