0
votes
2answers
45 views

Delete oldest directory, skipping two of them

I have to delete oldest directory. But, two of directories does not have to be "included" in this action. So, directory content looks like this: [root@myserver backup]# ls -la total 84 drwxr-xr-x 21 ...
3
votes
3answers
274 views

Prevent 'cd' remembering symbolic links traversed

Say you have directory ~/mytool that softlinks to /usr/local/mytool. Then cd mytool leaves your current directory as ~/mytool, which may cause scripts to behave incorrectly. Is there a way to avoid ...
1
vote
2answers
239 views

Move content of one folder to another

I Have a directory say abc in var/www/ on my server Now i want to move all the content of abc/ directory to var/www/ What will the linux command for this. New bie in linux
1
vote
2answers
247 views

cd to a directory when its path is entered as a command (instead of “foo is a directory” error)

I hate when bash gives me "duh!" kind of error: foo$ ./bar -bash: ./bar: is a directory I used to love AmigaOS shell in which "execution" of a directory simply meant setting it as the current ...
10
votes
5answers
280 views

How do I change to the directory I just moved that file to?

So lets assume I've just done: mv ./myfile /to/some/other/place/ And I now decide I want to follow the file, and go into that directory. Whilst I could head for the mouse, select the text, type ...