Skip to content
This repository has been archived by the owner on Feb 20, 2019. It is now read-only.

Update update.rst #251

Closed
wants to merge 1 commit into from
Closed

Update update.rst #251

wants to merge 1 commit into from

Conversation

wadoli
Copy link

@wadoli wadoli commented Jan 22, 2014

changed ls call so as not to include . and .. (ls manpage: -A List all entries except for . and ... Always set for the super-user.)

changed ls call so as not to include . and .. (ls manpage: -A List all entries except for . and ...  Always set for the super-user.)
@MorrisJobke
Copy link
Contributor

But ls without any parameter doesn't list hidden files (which includes . and ..)

The command without -A works fine for me.

@wadoli
Copy link
Author

wadoli commented Jan 23, 2014

Well it did on my hosting provider's server, where I login as a normal user. I'm still waiting for the restore... :-)

@MorrisJobke
Copy link
Contributor

@wadoli can you the ls command with which ls? Maybe you have added an alias for ls

@wadoli
Copy link
Author

wadoli commented Jan 24, 2014

which ls has no result. alias returns among other things alias ls='/bin/ls $LS_OPTIONS'. echo $LS_OPTIONS returns --color=tty -F -a -b -T 0. So I guess the option -a explains my troubles. I don't know how common this kind of options-setting is among hosting providers, but I guess my recommendation might help in similar cases. (still waiting for the restore btw.)

@MorrisJobke
Copy link
Contributor

cc @DeepDiver1975 @karlitschek @bantu What do you think?

@DeepDiver1975
Copy link
Contributor

maybe use find instead of ls ?

@bantu
Copy link

bantu commented Jan 24, 2014

Agree with @DeepDiver1975

@bantu
Copy link

bantu commented Jan 24, 2014

As a starting point: find . -maxdepth 1 -type d -name data -prune -o -type d -name config -prune -o -exec rm -rf {} \;

@bantu
Copy link

bantu commented Jan 24, 2014

find . -mindepth 1 -maxdepth 1 \
    -type d -name data -prune -o \
    -type d -name config -prune -o \
    -exec rm -rf {} \;

@bantu
Copy link

bantu commented Jan 24, 2014

find . -mindepth 1 -maxdepth 1 ! -path data ! -path config -exec rm -rf {} \;

@MorrisJobke
Copy link
Contributor

I would prefer #254

@wadoli
Copy link
Author

wadoli commented Jan 29, 2014

Fine with me. Thanks.

@wadoli wadoli closed this Jan 29, 2014
@wadoli wadoli deleted the patch-1 branch January 29, 2014 12:25
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants