You are not logged in.

#1 2011-11-12 03:01:49

geo909
Member
Registered: 2008-09-07
Posts: 309

[SOLVED] An empty file called "null" appears in my home folder

Hi all,

So I have this empty file called "null" in appearing in my home folder, no
matter how many times I delete it; when I do, after 2 seconds it pops out
again..

I'm confused.. Don't have the slightest idea why this is going on..

This is how my .xinitrc looks like, if this helps:

#!/bin/sh

parcellite &

exec ck-launch-session &
exec dbus-launch &

 Check for my external monitor

if [ "VGA1 connected" = "$(xrandr | grep -o "VGA1 connected")" ]; then

xrandr --output HDMI1 --off --output LVDS1 --mode 1280x800 --pos 1920x0 --rotate normal --output TV1 --off --output VGA1 --mode 1920x1080 --pos 0x0 --rotate normal
fi

wallpaper=$(ls ~/Images/Wallpapers -1 | shuf -n 1)
feh --bg-scale /home/jorge/Images/Wallpapers/"$wallpaper" &
#feh --bg-scale ~/Images/Wallpapers/scratandme16\:9.jpg

while true
do
	xsetroot -name "`date` `uptime | sed 's/.*,//'`"
	sleep 1
done &

lxterminal &
sh /home/jorge/Scripts/CheckDropbox.sh &
exec dwm

Thanks a lot in advance..

Last edited by geo909 (2011-11-12 16:00:34)

Offline

#2 2011-11-12 04:27:19

stqn
Member
Registered: 2010-03-19
Posts: 1,191
Website

Re: [SOLVED] An empty file called "null" appears in my home folder

Well, does your CheckDropbox.sh script do something every two seconds? smile

Offline

#3 2011-11-12 06:11:47

fschiff
Member
Registered: 2011-10-06
Posts: 71

Re: [SOLVED] An empty file called "null" appears in my home folder

This is probably a bug some where in a script.  An output or error redirection is probably supposed to go to /dev/null but is instead creating a file called null in your home directory.

Use grep and find the culprit.

Offline

#4 2011-11-12 15:47:24

geo909
Member
Registered: 2008-09-07
Posts: 309

Re: [SOLVED] An empty file called "null" appears in my home folder

So, yes, I have CheckDropbox.sh checking something every 60 secs..
Do you think I'm missing something? I don't know much when it comes
to shell scripting..

#!/bin/bash

# While there is a connection, the script checks every 60 secs if 
# the dropbox status is "Dropbox isn't running" or "Connecting",
# and if so, it reconnects the service. Could start from .xinitrc.

while true; do
	ping -c 1 www.google.com 1>/dev/null 2>/dev/null
	if [ "$?" = 0 ]; then
		dropbox status | egrep 'isn|Connecting'>null
		if [ "$?" = 0 ]; then
			dropbox stop
			dropbox start
		fi
 	fi
	sleep 60
done

EDIT: yes, it is this shell script.. Changed the sleep time and the null file appears in different times now.
I think it's going to be easy to see where it comes from, I'll search later, so no need to waste your time
(unless it's something you can see right away smile) ),,

Last edited by geo909 (2011-11-12 15:57:48)

Offline

#5 2011-11-12 15:59:06

stqn
Member
Registered: 2010-03-19
Posts: 1,191
Website

Re: [SOLVED] An empty file called "null" appears in my home folder

geo909 wrote:
		dropbox status | egrep 'isn|Connecting'>null

Should be /dev/null.

Offline

#6 2011-11-12 16:03:45

geo909
Member
Registered: 2008-09-07
Posts: 309

Re: [SOLVED] An empty file called "null" appears in my home folder

stqn wrote:
geo909 wrote:
		dropbox status | egrep 'isn|Connecting'>null

Should be /dev/null.

Ah, yes! Thanks so much..

Offline

#7 2011-11-12 16:05:09

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: [SOLVED] An empty file called "null" appears in my home folder

geo909, if you're wondering where your post went, you sent it to the mods via Report. Don't worry, it happens quite a bit. smile

geo909 wrote:

Ah, thanks so much!


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

Board footer

Powered by FluxBB